mxgxw / MFRC522-python

A small class to interface with the NFC reader Module MFRC522
GNU Lesser General Public License v3.0
521 stars 419 forks source link

problem with the Write.py script. #68

Open steaward opened 5 years ago

steaward commented 5 years ago

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.

BombayCoast commented 5 years ago

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

hawaii-do commented 5 years ago

Same problem with python 2.7.13 on Raspbian 9.

sandeeppusthey commented 5 years ago

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

steaward commented 5 years ago

@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!

aa003 commented 5 years ago

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

abrakhim commented 5 years ago

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