jesseward / plex-lastfm-scrobbler

Scrobble played audio items Last.FM from the Plex Media Server application.
MIT License
91 stars 13 forks source link

Couldn't install on Archlinux #35

Closed howtoslip closed 7 years ago

howtoslip commented 9 years ago

Hi, I tried to install following the instruction, but couldn't... it seems to be a syntax problem... could you help?

[root@alarm plex-lastfm-scrobbler-master]# python setup.py install running install running build running build_py running build_scripts running install_lib byte-compiling /usr/lib/python3.4/site-packages/plex_scrobble/plex_monitor.py to plex_monitor.cpython-34.pyc File "/usr/lib/python3.4/site-packages/plex_scrobble/plex_monitor.py", line 50 except urllib2.URLError, e: ^ SyntaxError: invalid syntax

byte-compiling /usr/lib/python3.4/site-packages/plex_scrobble/scrobble_cache.py to scrobble_cache.cpython-34.pyc File "/usr/lib/python3.4/site-packages/plex_scrobble/scrobble_cache.py", line 48 print u'time={key}, artist={artist}, track={track}, album={album}age={age}'.format( ^ SyntaxError: invalid syntax

byte-compiling /usr/lib/python3.4/site-packages/plex_scrobble/pre_check.py to pre_check.cpython-34.pyc File "/usr/lib/python3.4/site-packages/plex_scrobble/pre_check.py", line 18 print self.BAR ^ SyntaxError: invalid syntax

byte-compiling /usr/lib/python3.4/site-packages/plex_scrobble/lastfm.py to lastfm.cpython-34.pyc File "/usr/lib/python3.4/site-packages/plex_scrobble/lastfm.py", line 64 except urllib2.URLError, e: ^ SyntaxError: invalid syntax

running install_scripts changing mode of /usr/bin/plex-scrobble.py to 755 running install_data running install_egg_info Removing /usr/lib/python3.4/site-packages/plex_scrobble-1.3.3-py3.4.egg-info Writing /usr/lib/python3.4/site-packages/plex_scrobble-1.3.3-py3.4.egg-info

jesseward commented 9 years ago

@howtoslip thanks for reporting. Looks like Arch is using Python 3.4 as their default Python interpreter. Plex Scrobble will not work with Python 3 yet.

Do you have a Python 2 installation on that host? try python2 from a shell? I would also recommend against installing the script as root. Try to install within a Python 2 virturalenv as a non privileged user. The README should have some details on how to go about this.

Some details with regards to Arch specific and multiple python versions at http://stackoverflow.com/questions/7297094/proper-way-to-manage-multiple-versions-of-python-on-archlinux .

jesseward commented 7 years ago

hi @howtoslip, this should now be resolved under https://github.com/jesseward/plex-lastfm-scrobbler/pull/45