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

GPIO.setwarnings(False) to disable #75

Open
mhht opened this issue May 16, 2019 · 3 comments
Open

GPIO.setwarnings(False) to disable #75

mhht opened this issue May 16, 2019 · 3 comments

Comments

@mhht
Copy link

mhht commented May 16, 2019

Hello I have with the READ.PY probelm and do not know how to handle it. Help and thanks for the help.

/home/pi/MFRC522-python/MFRC522.py:133: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
GPIO.setup(self.NRSTPD, GPIO.OUT)
Traceback (most recent call last):
File "read2.py", line 41, in
MIFAREReader = MFRC522.MFRC522()
File "/home/pi/MFRC522-python/MFRC522.py", line 135, in init
self.MFRC522_Init()
File "/home/pi/MFRC522-python/MFRC522.py", line 406, in MFRC522_Init
self.MFRC522_Reset();
File "/home/pi/MFRC522-python/MFRC522.py", line 138, in MFRC522_Reset
self.Write_MFRC522(self.CommandReg, self.PCD_RESETPHASE)
File "/home/pi/MFRC522-python/MFRC522.py", line 141, in Write_MFRC522
spi.transfer(((addr<<1)&0x7E,val))
TypeError: function takes exactly 2 arguments (1 given)

@Comfubar
Copy link

Comfubar commented Jun 3, 2019

Im also having around the Same issue with mine on a Raspberry Pi B+

Traceback (most recent call last):
File "Read.py", line 41, in
MIFAREReader = MFRC522.MFRC522()
File "/root/SPI-Py/MFRC522-python/MFRC522.py", line 135, in init
self.MFRC522_Init()
File "/root/SPI-Py/MFRC522-python/MFRC522.py", line 406, in MFRC522_Init
self.MFRC522_Reset();
File "/root/SPI-Py/MFRC522-python/MFRC522.py", line 138, in MFRC522_Reset
self.Write_MFRC522(self.CommandReg, self.PCD_RESETPHASE)
File "/root/SPI-Py/MFRC522-python/MFRC522.py", line 141, in Write_MFRC522
spi.transfer(((addr<<1)&0x7E,val))
TypeError: function takes exactly 2 arguments (1 given)

@Comfubar
Copy link

Comfubar commented Jun 3, 2019

Hello I have with the READ.PY probelm and do not know how to handle it. Help and thanks for the help.

/home/pi/MFRC522-python/MFRC522.py:133: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
GPIO.setup(self.NRSTPD, GPIO.OUT)
Traceback (most recent call last):
File "read2.py", line 41, in
MIFAREReader = MFRC522.MFRC522()
File "/home/pi/MFRC522-python/MFRC522.py", line 135, in init
self.MFRC522_Init()
File "/home/pi/MFRC522-python/MFRC522.py", line 406, in MFRC522_Init
self.MFRC522_Reset();
File "/home/pi/MFRC522-python/MFRC522.py", line 138, in MFRC522_Reset
self.Write_MFRC522(self.CommandReg, self.PCD_RESETPHASE)
File "/home/pi/MFRC522-python/MFRC522.py", line 141, in Write_MFRC522
spi.transfer(((addr<<1)&0x7E,val))
TypeError: function takes exactly 2 arguments (1 given)

So I found this on this issue rolled back like that one stated as well thought ehh its from 2016 Why not try

Well now ive done everything It started the Read.py correctly but It just doesnt read them now

#69

Did this all as well

I can now detect card on Read.py.
My problem was that I use python3 on Raspberry Pi3.
I do some change:

after downloaded, sudo python3 setup.py install on /SPI-py (latest version)
Then i've changed all print in MFRC522.py like this print "test" -> print("test")
The NRSTPD is set to 11 in MFRC522.py

Now its just not Reading :(

@yamatopotter
Copy link

going back to python 2.7 don't solve the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants