yangzhibo450 / epassportviewer

Automatically exported from code.google.com/p/epassportviewer
0 stars 1 forks source link

epassportviewer crashes while trying to read a passport #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Enter an MRZ and hit read

What is the expected output? What do you see instead?
Well, instead of reading in the passport data the program dies with the 
following error message:

---------------------------
cx_Freeze: Python error in main script
---------------------------
Traceback (most recent call last):
  File "C:\Python25\lib\site-packages\cx_Freeze\initscripts\Console.py", line 29, in <module>
  File "epassportviewer/ePassportViewer.py", line 71, in <module>
  File "epassportviewer/ePassportViewer.py", line 67, in run
  File "C:\Python25\lib\lib-tk\Tkinter.py", line 1023, in mainloop
  File "C:\Python25\lib\lib-tk\Tkinter.py", line 1414, in __call__
  File "D:\workspace2\epassportviewer\src\epassportviewer\frame\mrzInput.py", line 91, in read
  File "D:\workspace2\epassportviewer\src\epassportviewer\frame\mrzInput.py", line 104, in process
  File "D:\workspace2\epassportviewer\src\epassportviewer\mvc.py", line 252, in gotMRZ
  File "D:\workspace2\epassportviewer\src\epassportviewer\mvc.py", line 309, in _detectReader
  File "C:\Python25\lib\site-packages\pypassport\reader.py", line 361, in waitForCard
  File "C:\Python25\lib\site-packages\pypassport\reader.py", line 329, in _autoDetect
  File "C:\Python25\lib\site-packages\pypassport\reader.py", line 227, in connect
  File "C:\Python25\lib\site-packages\pypassport\reader.py", line 158, in connect
  File "C:\Python25\lib\site-packages\smartcard\CardConnectionDecorator.py", line 53, in connect
  File "C:\Python25\lib\site-packages\smartcard\pcsc\PCSCCardConnection.py", line 98, in connect
CardConnectionException: 'Smartcard Exception: Unable to connect with protocol: 
T0 The requested protocols are incompatible with the protocol currently in use 
with the smart card. !'

---------------------------
OK   
---------------------------

What version of the product are you using? On what operating system?
ePassportViewer 1.0-win32, OmniKey 5321 with HIDglobal drivers, Windows 7 64 bit

Thanks for your help,
Domonkos

Original issue reported on code.google.com by hundomi1...@gmail.com on 13 Dec 2010 at 10:48

GoogleCodeExporter commented 9 years ago
Fixed by returning to Windows XP SP3....

Original comment by hundomi1...@gmail.com on 14 Dec 2010 at 7:38

GoogleCodeExporter commented 9 years ago
i get the same error. is there a specific fix? (i am on windowx xp sp3)
I use a ACR 122U-A2

Original comment by pjsche...@gmail.com on 11 Mar 2011 at 9:19

GoogleCodeExporter commented 9 years ago
No, sadly no, I got the same exception while using an other ePassport program 
(pypassport) on Linux, so I guess there is some main underlying problem in a 
config file or something...

It is probably in the python implementation of reading smartcards...

Sadly this project is totally dead so I am not expecting any help from the 
developers, we should figure it out on our own or just use a different reader 
program (eg. RFIDIOt by Adam Laurie)

Original comment by dtomc...@gmail.com on 11 Mar 2011 at 2:08

GoogleCodeExporter commented 9 years ago
I've had this error on initial read attempts on one Win7 X64 box, then on 
another Win7 x64 box, it only appeared after two successful reads.  I was able 
to resolve it.  I'm not claiming to know the exact source of the issue, but it 
does seem to be state sensitive.  Not clearing/quiting the program after a 
successful read might be a reason.  Here's what resolved it for me:

1. After receiving the error, close the program completely.
2. From it's running directory, ensure the config.ini "path" is pointed to a 
real directory and remove the extra newline after "sm=[true|false]" in the 
[Logs] section
3. if the 'history' file in the directory is not empty, clear it out
4. Re-run per the manual

My guess is it attempts to use some previous values from somewhere (e.g. 
history file).. Hope this helps

Original comment by Erik.T.B...@gmail.com on 30 May 2013 at 2:31

GoogleCodeExporter commented 9 years ago
For my passport it was really the access protocol as stated in the error message
"Smartcard Exception: Unable to connect with protocol: T0"

With Windows 8 64bit I did this:
1. A manual installation of all the components like in the installation 
instructions for pypassport and epassportviewer.
2. Edited line 158 in file pypassport-1.0\pypassport\reader.py
from
     self._pcsc_connection.connect(self.sc.scard.SCARD_PCI_T0
to
     self._pcsc_connection.connect(self.sc.scard.SCARD_PCI_T1
3. From pypassport directory in a command line with administration rights
   "setup.py install"
4. Moved ePassportViewer.py from sub-directory "epassportviewer" up to the 
directory "epassportviewer-1.0" in which I had unzipped the sources (where 
config.ini is located).
5. Started "ePassportViewer.py" and it worked.

Original comment by nochnext...@googlemail.com on 2 Jun 2013 at 5:18