pyscard icon indicating copy to clipboard operation
pyscard copied to clipboard

The Smart Card Resource Manager is not running. (0x8010001D)

Open syariffortask opened this issue 1 year ago • 13 comments
trafficstars

Your system information

  • Operating system used: windows 11
  • pyscard version:2.0.8
  • Python version: 3.11.8

Please describe your issue in as much detail as possible:

The Smart Card Resource Manager is not running. (0x8010001D)

Describe what did happen.

I was confused because there was an error: Failed to establish context: The Smart Card Resource Manager is not running. (0x8010001D), but I have run the smartcard service on windows service, can it help me

Steps for reproducing this issue:

and this is my code.

from smartcard.Exceptions import NoCardException
from smartcard.System import readers
from smartcard.util import toHexString

try:
    available_readers = readers()
    if not available_readers:
        print("Tidak ada pembaca kartu pintar yang tersedia.")
    else:
        for reader in available_readers:
            try:
                connection = reader.createConnection()
                connection.connect()
                
                atr = toHexString(connection.getATR())

                print("Pembaca:", reader)
                print("ATR:", atr)
            except NoCardException:
                print("Pembaca:", reader)
                print("Tidak ada kartu yang dimasukkan.")
except Exception as e:
    print("Terjadi kesalahan:", e)

syariffortask avatar Apr 30 '24 09:04 syariffortask

What did you do to get the error? Have you removed the reader?

See also https://github.com/LudovicRousseau/pyscard/issues/136 https://github.com/LudovicRousseau/pyscard/issues/153

LudovicRousseau avatar Apr 30 '24 10:04 LudovicRousseau

  1. I use the ACS 120U reader, I want to learn to use the Smartcard Reader in my Python program, but when I run the program to see the available readers I get this error

  2. Yes, I have removed the reader

syariffortask avatar Apr 30 '24 11:04 syariffortask

You get the error AFTER you removed the reader?

Please describe exactly what you do and what you get.

LudovicRousseau avatar Apr 30 '24 18:04 LudovicRousseau

I have run my code with the smartcard reader plug in my computer's USB port, but when I run my program above there is an error, this is the error "The Smart Card Resource Manager is not running. (0x8010001D)"

syariffortask avatar May 01 '24 13:05 syariffortask

The error is returned by Windows itself. Maybe you reader driver is not installed or something like that.

LudovicRousseau avatar May 01 '24 13:05 LudovicRousseau

But i have already install driver for acs reader 120u

syariffortask avatar May 01 '24 13:05 syariffortask

I can't help on Windows. Maybe ACS can provide some support.

LudovicRousseau avatar May 01 '24 13:05 LudovicRousseau

Windows requires the Smart Card service to be running. Sometimes you have to enable it before you can communicate to a NFC reader. https://answers.microsoft.com/en-us/windows/forum/all/smartcard-resource-manager-is-not-running/b9aefb42-9d43-4356-8d63-341d2b1bba4a

mbokil avatar May 01 '24 14:05 mbokil

I've already runing smart card service

syariffortask avatar May 01 '24 16:05 syariffortask

One other thing with Windows we found is after the user plugs in the NFC reader we always have them restart. We found the device drivers that install via plug and play often times need to be restarted. Then Python will be able to communicate to the device via SWIG.

mbokil avatar May 02 '24 01:05 mbokil

still can't solve this isue, anybody can help please

syariffortask avatar May 09 '24 01:05 syariffortask

@syariffortask have you asked Microsoft? You've bought a Windows license, so you should receive technical support for Windows-related problems. No ?

LudovicRousseau avatar May 09 '24 08:05 LudovicRousseau

I have already ask Microsoft but Microsoft still can't reply my message

syariffortask avatar May 22 '24 10:05 syariffortask

This is a Windows issue. PySCard can't fix it.

LudovicRousseau avatar Oct 19 '24 12:10 LudovicRousseau