Hello, I'm trying to use pyscard by running some code samples, but right at the beggining, when trying to establish a context, the program crashes due an unidentified error code, as showed below.
Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> from smartcard.scard import * >>> hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER) >>> hresult -855572480L >>> hex(hresult) '-0x32ff0000L' >>>
I don't know what the problem might be, since the value of hresult is not a listed SCARDRETCODE.
It would be of great help if somebody could look into it.
Best Regards,
Emiliano Leite.
It looks like -855572480L is a Windows specific error code. I have no idea what it is.
I could find it also in http://bytes.com/topic/visual-basic-net/answers/385725-smartcard
What version of pyscard do you use?
Where did you got it?
I'm using pyscard-1.7.0, which I downloaded here at sourceforge.
I don't believe there's a problem with my SCARDLIBlib dll(as mentioned in http://bytes.com/topic/visual-basic-net/answers/385725-smartcard) for I already have functioning scard libs in java and c++ here in my machine, but I could be wrong.
I'm really sorry about the duplicated tickets.
Cheers.
-Emiliano.
I just now tried to install pyscard-1.7.0 on a 64bit machine, and it worked perfectly.
Did you used the 32-bits version on the 32-bits Windows?
Yes, I did.
I do not use Windows myself.
Maybe the Windows binary provided at sourceforge is wrong. You can try to rebuild it yourself.
I don't know what you mean by "rebuild it", but I already tried installing the lib using the binaries and the 'installer', both to no avail.
"rebuild" is:
Something like:
Just did it. Unfortunately it didn't work.
Installing pyscard-1.9.0 (on Python 2.7.10) fixed the problem.
OK. Closing the bug report.