Closed asllearner closed 9 years ago
I commented out the offending line, and also changed the first few lines to account for PIL/Pillow: Beginning of file now reads:
#!/usr/bin/env python
# import ImageTk
#replaced with
from PIL import ImageTk
import PIL.Image
I got the following errors. Out of my league. No idea what it means:
cd '/Users/me/Downloads/journal2ebook-master/journal2ebook/' && '/usr/bin/pythonw' '/Users/me/Downloads/journal2ebook-master/journal2ebook/journal2ebook2.py' && echo Exit status: $? && exit 1
2014-05-30 12:35:17.264 Python[58489:d07] Error loading /Library/ScriptingAdditions/Satimage.osax/Contents/MacOS/Satimage: dlopen(/Library/ScriptingAdditions/Satimage.osax/Contents/MacOS/Satimage, 262): no suitable image found. Did find:
/Library/ScriptingAdditions/Satimage.osax/Contents/MacOS/Satimage: no matching architecture in universal wrapper
pythonw: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Satimage.osax" declares no loadable handlers.
Traceback (most recent call last):
File "/Users/me/Downloads/journal2ebook-master/journal2ebook/journal2ebook2.py", line 479, in <module>
myapp=Journal2ebook(root,filename)
File "/Users/me/Downloads/journal2ebook-master/journal2ebook/journal2ebook2.py", line 96, in __init__
self.setup()
File "/Users/me/Downloads/journal2ebook-master/journal2ebook/journal2ebook2.py", line 104, in setup
self.prepImage()
File "/Users/me/Downloads/journal2ebook-master/journal2ebook/journal2ebook2.py", line 260, in prepImage
self.img = PIL.Image.open(imFile)
File "build/bdist.macosx-10.6-universal/egg/PIL/Image.py", line 2099, in open
File "build/bdist.macosx-10.6-universal/egg/PIL/Image.py", line 343, in preinit
File "build/bdist.macosx-10.6-universal/egg/PIL/PpmImagePlugin.py", line 35, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0x85 in position 6: ordinal not in range(128)
I fixed the problem with Tesseract. I had deleted the folder by mistake.
Sorry - I didn't see this sooner. I'm not a mac user, but I'll try to help if I can and if you are still having the issue (and interested). Which version of python are you using?
Changed label to wontfix because this has not been reproduced.
I don't know if OP is returning, but I thought I'd let others know that using python 2.6 reproduces error.
@monkeypuzzler Thanks for letting me know. For now I'll put python 2.7 as a requirement, but the fix might not be too difficult. Let me know if you get any more information or if you are able to fix it yourself.
Thanks for providing the motivation to create my first fork and pull request! It turned out to be an easy fix - python 2.6 doesn't support dictionary comprehensions. I changed the dictionary comprehension into a list comprehension which produced a list of (key,value)-tuples, and fed that list into dict() to produce the required dictionary.
now should work with python 2.6 (pull request #31)
Thanks @monkeypuzzler for figuring this out, and congrats on your first pull request! I agree that this should not break any other versions of python.
There seems to be a caret under the word "for"
I am only a beginner at linux, so I need somewhat explicit directions.
I do have a tessdata folder, /Applications/VietOCR3 App/tesseract-ocr/tessdata (But I havent been able to get vietocr3 to work. another story) How do I set the tessdata_prefix??
thx