GustavePate / lycheesync

a command line interface tool to sync lychee with any directory containing photos
108 stars 37 forks source link

Script execution error with pymysql #71

Closed and-jan closed 8 years ago

and-jan commented 8 years ago

When starting the script I get the following error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/opt/lycheesync/lycheesync/sync.py", line 6, in <module>
    from lycheesync.lycheesyncer import LycheeSyncer
  File "lycheesync/lycheesyncer.py", line 8, in <module>
    from lycheesync.lycheedao import LycheeDAO
  File "lycheesync/lycheedao.py", line 5, in <module>
    import pymysql
ImportError: No module named pymysql

I also installed all dependencies as described in the installation guide.

beardyjesse commented 8 years ago

Hi, I'd like to echo the comment by @c0d1ng above. Please see my below showing that pymysql is installed, but not imported within the script. Any clues?

beard@plexbeard:~$ sudo -H pip install pymysql Requirement already satisfied (use --upgrade to upgrade): pymysql in /usr/local/lib/python2.7/dist-packages beard@plexbeard:~$ cd /var/lycheesync && . ./venv3.5/bin/activate && python -m lycheesync.sync /home/beard/data/backup/Pictures/timelapse/balcony/ /var/www/html/Lychee/ ./ressources/balcony_public.json Traceback (most recent call last): File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/var/lycheesync/lycheesync/sync.py", line 6, in <module> from lycheesync.lycheesyncer import LycheeSyncer File "/var/lycheesync/lycheesync/lycheesyncer.py", line 8, in <module> from lycheesync.lycheedao import LycheeDAO File "/var/lycheesync/lycheesync/lycheedao.py", line 5, in <module> import pymysql ImportError: No module named 'pymysql'

and-jan commented 8 years ago

Nevermind, just ran the installation process again and everything worked fine :)

Meiglus commented 6 years ago

Hi,

I'd like to reopen this issue, because I have the same problem like c0d1ng. But I couldn't solve it by going through the installation again.. All tools are installed the debian way.

I installed the packages like it says in the description:

sudo apt-get install python3-dev python3 python3-pymysql python3-click python3-pil python3-dateutil libjpeg-dev

But still..

Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "main", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/var/www/clients/client1/web31/web/lycheesync/lycheesync/sync.py", line 6, in from lycheesync.lycheesyncer import LycheeSyncer File "lycheesync/lycheesyncer.py", line 8, in from lycheesync.lycheedao import LycheeDAO File "lycheesync/lycheedao.py", line 5, in import pymysql ImportError: No module named pymysql

If I execute the command with python3 instead of python, I get:

Traceback (most recent call last): File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/var/www/clients/client1/web31/web/lycheesync/lycheesync/sync.py", line 6, in from lycheesync.lycheesyncer import LycheeSyncer File "/var/www/clients/client1/web31/web/lycheesync/lycheesync/lycheesyncer.py", line 16, in import piexif ImportError: No module named 'piexif'

Any help here? :(