Closed xetum closed 5 years ago
The problem is that nfc_device
definitions in freefare.py
and nfc.py
are different. in freefare.py
add from .nfc import nfc_device
and comment class nfc_device ...
and nfc_device._fields_...
Thank you for reporting, you were correct, and this should be fixed in the new 0.1.1 release.
just a question, if you want to install from git, pip3 install git+https://github.com/BarnabyShearer/pynfc.git
won't execute gen.py
. Does make
need to be executed manually? (it could be executed automatically in python3 setup.py build
)
Yes atm, you would need to install the requirements.txt and then run make. You will also need your distro's version of sudo apt install -y libssl-dev libnfc-dev libfreefare-dev libclang-5.0-dev
.
I will look at replacing make with setup.py.
I get following error when I put the tag closer (an ISO/IEC 14443A (106 kbps) target):
Exception in thread Thread-2: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 763, in run self.target(*self.args, *self.kwargs) File "/home/pi/.local/lib/python2.7/site-packages/pynfc/init__.py", line 37, in
tread = threading.Thread(target=lambda: timeout_queue.put(func( args, **kwargs)))
ArgumentError: argument 1: <type 'exceptions.TypeError'>: expected LP_nfc_device instance instead of LP_nfc_device
My script is (RPi3 device):
I suspect the problem is with get_tags (line 98 init.py). Thanks