mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
typo
This commit is contained in:
+1
-1
@@ -53,7 +53,7 @@ body{counter-reset:h1 12}
|
||||
File "C:\Python31\lib\encodings\cp1252.py", line 23, in decode
|
||||
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
|
||||
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 28: character maps to <undefined></samp>
|
||||
<samp class=p>>>> /samp></pre>
|
||||
<samp class=p>>>> </samp></pre>
|
||||
|
||||
<p>What just happened? You didn’t specify a character encoding, so Python is forced to use the default encoding. What’s the default encoding? If you look closely at the traceback, you can see that it’s dying in <code>cp1252.py</code>, meaning that Python is using CP-1252 as the default encoding here. (CP-1252 is a common encoding on computers running Microsoft Windows.) The CP-1252 character set doesn’t support the characters that are in this file, so the read fails with an ugly <code>UnicodeDecodeError</code>.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user