ohadcn / snbopen

convert samsung S-note files (.snb) to pdf or open them.
BSD 3-Clause "New" or "Revised" License
32 stars 41 forks source link

import module "Image" or "image"? #5

Open deanvry opened 5 years ago

deanvry commented 5 years ago

OS: Linux Mint 19.2 Tina x86_64 Linux: 4.15.0-54-generic Python: 3.6.8 S-Note version: Samsung Galaxy Ace 3 TMemo

First Error Code: $ ~/snbopen.py

Traceback (most recent call last):
  File "./snbopen.py", line 7, in <module>
    import Image
ImportError: No module named Image

Is this just a typo? So i renamed "Image" with "image" then its resulting error: $ ./Programs/snbopen/snbopen.py Memo_20181204_093758338.snb

Traceback (most recent call last):
  File "/home/dean/Programs/snbopen/snbopen.py", line 149, in <module>
    snbToPdf(argv[1],pdfFileName)
  File "/home/dean/Programs/snbopen/snbopen.py", line 142, in snbToPdf
    pdfCanvas.save()
UnboundLocalError: local variable 'pdfCanvas' referenced before assignment

Thanks.

ohadcn commented 5 years ago

I haven't used the script a long time. A. did you install python-imaging? (via apt or pip)? B. did you supply a .snb file to the script? it doesn't look like that from the code you sent. C. try to force the usage of python 2 (edit the first line to #!/usr/bin/python2 or run python2 snbopen.py file.snb)

RM-0454 commented 3 years ago

I have same issue. I changed line 7 to

from PIL import Image

I still have spotty results, but it sorta works for me now.