title: Raspberry Pi 3B and RFID RC522 - Python TypeError
body: <p>I've been messing around with Raspberry Pi and RFID and found this tutorial:</p>
  
  <p><a href="https://pimylifeup.com/raspberry-pi-rfid-rc522/" rel="nofollow noreferrer">https://pimylifeup.com/raspberry-pi-rfid-rc522/</a></p>
  
  <p>Everything went fine with the installation but when I'm running the script it presents an error.</p>
  
  <p>This is the problem:</p>
  
  <pre><code>pi@raspberrypi:~/MFRC522-python $ sudo python Write.py
  /home/pi/MFRC522-python/MFRC522.py:115: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
    GPIO.setup(25, GPIO.OUT)
  Traceback (most recent call last):
    File "Write.py", line 6, in &lt;module&gt;
      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&lt;&lt;1)&amp;0x7E,val))
  TypeError: function takes exactly 2 arguments (1 given)
  </code></pre>
  
  <p>This is the Write.py file:</p>
  
  <pre><code>#!/usr/bin/env python
  
  import RPi.GPIO as GPIO
  import SimpleMFRC522
  
  reader = SimpleMFRC522.SimpleMFRC522()
  
  try:
          text = raw_input('New data:')
          print("Now place your tag to write")
          reader.write(text)
          print("Written")
  finally:
          GPIO.cleanup()
  </code></pre>
  
  <p>I can't find the solution to this problem in any place. Already tried to use Python 3 and other libraries but I'm still getting the error.</p>
  
  <p>UPDATE :</p>
  
  <p>Edited this on MFRC522.py file :</p>
  
  <pre><code>def Write_MFRC522(self, addr, val):
      spi.transfer( (addr&lt;&lt;1)&amp;0x7E, val )
  </code></pre>
  
  <p>And now I get this output :</p>
  
  <pre><code>/home/pi/MFRC522-python/MFRC522.py:115: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
    GPIO.setup(25, GPIO.OUT)
  First argument must be a valid dictionary.: Success
  Aborted
  </code></pre>