View Single Post
Old 11-27-2012, 12:51 AM   #17
oldnat
Member
oldnat began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Nov 2012
Device: Bookeen Cybook Odyssey HD Frontlight
So this morning i changed the source (and named it penelop3.py to distinguish) to match the syntax of Python V3.

This time it ran much longer, it created an .idx file (empty) and crashed after about 30 seconds with

[INFO] Outputting in Odyssey format to file...
Traceback (most recent call last):
File "penelop3.py", line 979, in <module>
main()
File "penelop3.py", line 954, in main
write_to_Odyssey_format(config, parsed_data, debug)
File "penelop3.py", line 168, in write_to_Odyssey_format
output_file.write(input_file.read())
File "C:\Python33\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_t able)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 382: character maps to <undefined>

I tried another dictionary, with logically the same result for it crashes already at reading the empty.idx file - the empty.idx file really has a char 0x81 at this position (and several others as well).

I assume there can be something with the encoding of the file?
But that is an sqlit3 db file, so it should be handled as binary, not text, ergo no encoding...

BR Nat

EDIT
PS.: I am sitting on Windows 7
PS2.: I see Python33 choking on 81:

http://stackoverflow.com/questions/3...2-ansi-reading

so there around it shall be...

Last edited by oldnat; 11-27-2012 at 05:05 AM.
oldnat is offline   Reply With Quote