Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

"unicode strings are not supported" error on windows 10 python 3.7.4 #3

Open
bluexp1 opened this issue Nov 6, 2020 · 0 comments
Open

Comments

@bluexp1
Copy link

bluexp1 commented Nov 6, 2020

I receive this error running the script in terminal:
Traceback (most recent call last): File "H:\MFRC522-UART-master\Read.py", line 23, in <module> MIFAREReader = MFRC522.MFRC522() File "H:\MFRC522-UART-master\MFRC522.py", line 107, in __init__ self.reset(spd=1); File "H:\MFRC522-UART-master\MFRC522.py", line 119, in reset if not self.writeRegister(self.CommandReg, self.PCD_RESETPHASE): File "H:\MFRC522-UART-master\MFRC522.py", line 134, in writeRegister self.ser.write(chr(addr&0x7F)) File "E:\Program Files\Python37\lib\site-packages\serial\serialwin32.py", line 308, in write data = to_bytes(data) File "E:\Program Files\Python37\lib\site-packages\serial\serialutil.py", line 63, in to_bytes raise TypeError('unicode strings are not supported, please encode to bytes: {!r}'.format(seq)) TypeError: unicode strings are not supported, please encode to bytes: '\x01'
I think there is a compatibility problem on python 3!

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

No branches or pull requests

1 participant