Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux:error while running the NFCReader.py file #2

Closed
abdulazizalmass opened this issue Feb 13, 2016 · 6 comments

Comments

Projects
None yet
4 participants
@abdulazizalmass
Copy link

commented Feb 13, 2016

the code error is down:
risktaker@risktaker-G73Jh:~/Desktop/NFC reader$ python NFCReader.py Traceback (most recent call last): File "NFCReader.py", line 13, in <module> r = readers() File "/usr/lib/python2.7/dist-packages/smartcard/System.py", line 41, in readers return smartcard.reader.ReaderFactory.ReaderFactory.readers(groups) File "/usr/lib/python2.7/dist-packages/smartcard/reader/ReaderFactory.py", line 59, in readers zreaders += fm(groups) File "/usr/lib/python2.7/dist-packages/smartcard/pcsc/PCSCReader.py", line 107, in readers hcontext = PCSCContext().getContext() File "/usr/lib/python2.7/dist-packages/smartcard/pcsc/PCSCContext.py", line 53, in __init__ PCSCContext.instance = PCSCContext.__PCSCContextSingleton() File "/usr/lib/python2.7/dist-packages/smartcard/pcsc/PCSCContext.py", line 40, in __init__ raise EstablishContextException(hresult) smartcard.pcsc.PCSCExceptions.EstablishContextException: 'Failure to establish context: Service not available.'

@fr0zensn0w

This comment has been minimized.

Copy link

commented Apr 10, 2016

I am having this same error too with Ubuntu 15.10 not in a virtual machine.

@StevenTso

This comment has been minimized.

Copy link
Owner

commented Apr 10, 2016

@gautiermichelin any insight on this one?

@gautiermichelin

This comment has been minimized.

Copy link
Contributor

commented Apr 11, 2016

Hi,

Seen this report. I'd say it comes from installation lacks.
Usually this is what I do under Debian Jessie :

sudo apt-get install pcscd git python-setuptools swig gcc libpcsclite-dev python-dev
sudo echo "install nfc /bin/false" >> /etc/modprobe.d/blacklist.conf
sudo echo "install pn533 /bin/false" >> /etc/modprobe.d/blacklist.conf
cd ~
git clone https://github.com/LudovicRousseau/pyscard.git
cd pyscard
sudo python setup.py build_ext install
reboot

The modprobe part is there to resolve a conflict.
After the reboot, think about eventually starting "pcscd" if it's not running.

Hope it will help...

@fr0zensn0w

This comment has been minimized.

Copy link

commented Apr 11, 2016

That worked, just had to run the echo commands as root and that worked. Thanks!

@gautiermichelin

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2016

Don't hesitate to close this issue if it's ok :-)

@abdulazizalmass

This comment has been minimized.

Copy link
Author

commented Apr 23, 2016

Sure. I will leave a comment after testing your feedback. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.