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

Error: TypeError: must be str, not bytes #4

Open
twinwood opened this issue Feb 20, 2019 · 1 comment
Open

Error: TypeError: must be str, not bytes #4

twinwood opened this issue Feb 20, 2019 · 1 comment

Comments

@twinwood
Copy link

I am using Python 3.6, when I trying to run the code, error below appear, please help. TQ

Traceback (most recent call last):

File "", line 1, in
runfile('E:/PN532-HSU-master/readmifare.py', wdir='E:/PN532-HSU-master')

File "C:\Users\Lam\Anaconda3\envs\tfgpu36v2\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 668, in runfile
execfile(filename, namespace)

File "C:\Users\Lam\Anaconda3\envs\tfgpu36v2\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "E:/PN532-HSU-master/readmifare.py", line 41, in
pn532.SAM_configuration()

File "E:\PN532-HSU-master\PN532.py", line 333, in SAM_configuration
self.call_function(PN532_COMMAND_SAMCONFIGURATION, params=[0x01, 0x14, 0x01])

File "E:\PN532-HSU-master\PN532.py", line 297, in call_function
if not self._write_frame(data):

File "E:\PN532-HSU-master\PN532.py", line 204, in _write_frame
ack = self._ack_wait(1000)

File "E:\PN532-HSU-master\PN532.py", line 216, in _ack_wait
rx_info += self.ser.read(self.ser.inWaiting())

TypeError: must be str, not bytes

@Moon-developer
Copy link

Has this been resolved? I have the same error when running.

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

2 participants