MFRC522-python icon indicating copy to clipboard operation
MFRC522-python copied to clipboard

problem with the Write.py script.

Open steaward opened this issue 6 years ago • 6 comments

When trying to run the Write.py script, I get the following error:

Traceback (most recent call last): File "Write.py", line 6, in <module> reader = SimpleMFRC522.SimpleMFRC522() File "/home/pi/MFRC522-python/SimpleMFRC522.py", line 14, in __init__ self.READER = MFRC522.MFRC522() File "/home/pi/MFRC522-python/MFRC522.py", line 117, in __init__ self.MFRC522_Init() File "/home/pi/MFRC522-python/MFRC522.py", line 390, in MFRC522_Init self.MFRC522_Reset(); File "/home/pi/MFRC522-python/MFRC522.py", line 120, in MFRC522_Reset self.Write_MFRC522(self.CommandReg, self.PCD_RESETPHASE) File "/home/pi/MFRC522-python/MFRC522.py", line 123, in Write_MFRC522 spi.transfer(((addr<<1)&0x7E,val)) TypeError: function takes exactly 2 arguments (1 given)

Using Raspbian Stretch on a Pi 3.

steaward avatar Feb 20 '19 22:02 steaward

Same problem here. Doing it on a Raspberry pi 3 b+ with raspbian stretch.

BombayCoast avatar Feb 21 '19 04:02 BombayCoast

Same problem with python 2.7.13 on Raspbian 9.

hawaii-do avatar Feb 21 '19 10:02 hawaii-do

Me too having the same issue when Read.py is initialised

sandeeppusthey avatar Feb 21 '19 12:02 sandeeppusthey

@BombayCoast @te-ti @sandeeppusthey

Instead of going in and fixing the function call, I found it much easier to use pi-rc522.

Works no problem with Python 2.7, and I have tested it using the MFRC522 chip. Takes a bit of reading, however.

Cheers!

steaward avatar Feb 21 '19 17:02 steaward

Same problem with write.py on Raspberry Pi 3 Model B with python 3.5.3

aa003 avatar Feb 22 '19 01:02 aa003

Check my comment for issue #69 for a fix..

abrakhim avatar Feb 24 '19 08:02 abrakhim