MiczFlor / RPi-Jukebox-RFID

A Raspberry Pi jukebox, playing local music, podcasts, web radio and streams triggered by RFID cards, web app or home automation. All plug and play via USB. GPIO scripts available.
http://phoniebox.de
MIT License
1.33k stars 395 forks source link

unable to register device #26

Closed d7071 closed 6 years ago

d7071 commented 6 years ago

after calling python2 python2 RegisterDevice.py I get the following: Traceback (most recent call last): File "RegisterDevice.py", line 4, in from evdev import InputDevice, list_devices File "/usr/local/lib/python2.7/dist-packages/evdev/init.py", line 9, in from evdev.uinput import UInput, UInputError File "/usr/local/lib/python2.7/dist-packages/evdev/uinput.py", line 35 def from_device(cls, *devices, filtered_types=(ecodes.EV_SYN, ecodes.EV_FF), **kwargs):

Takeit-Ge commented 6 years ago

Exactly the same on my side on a Raspberry with Stretch. Just a plain fresh install and it gives me:

pi@raspberrypi:~/RPi-Jukebox-RFID/scripts $ python2 RegisterDevice.py Traceback (most recent call last): File "RegisterDevice.py", line 4, in from evdev import InputDevice, list_devices File "/usr/local/lib/python2.7/dist-packages/evdev/init.py", line 9, in from evdev.uinput import UInput, UInputError File "/usr/local/lib/python2.7/dist-packages/evdev/uinput.py", line 35 def from_device(cls, *devices, filtered_types=(ecodes.EV_SYN, ecodes.EV_FF), **kwargs): ^ SyntaxError: invalid syntax

d7071 commented 6 years ago

I figured out, that evdev just recenlty published Version 0.0.8. I fored python to install evdev 0.07. Now I got no errors but the cards won't show it's ID.

MiczFlor commented 6 years ago

@d7071 thanks for the input. What changes did you need to do to run it on Stretch? I haven't made a migration yet to the new system, but I guess this code would benefit from an update to the latest system. If you give me some pointers, I will give it a try. Thanks, micz

d7071 commented 6 years ago

Yes I ran it on strecht I believe I used sudo pip install evdev -version="0.0.7" , version 0.08 was released some days before.

Like I said, when I use the RFID card there is no ID in the text file.

MiczFlor commented 6 years ago

Hi @d7071

sudo pip install evdev -version="0.0.7" will assume "verbose" and gives me the error: "rsion=0.0.7 should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+"

The option --version shows the version and quits. So that is no help either.

Possibly you forced the version via --install-option <options> (Extra arguments to be supplied to the setup.py install command (use like --install-option="--install-scripts=/usr/local/bin").

?

MiczFlor commented 6 years ago

Hi @d7071 did you figure out how you specified the version of evdev on install? I think it would need to be version 0.7.0 - at least that is the version that is listed as 'latest' on github: https://github.com/gvalkov/python-evdev/releases

MiczFlor commented 6 years ago

Please @d7071 have a quick check if this is how you made it work:

sudo pip install "evdev == 0.7.0"
d7071 commented 6 years ago

I didn't try anything else. After all that I used a complete new R PI and everything went just fine.