Error unicode strings are not supported, please encode to bytes:
페이지 정보
본문
python3 pySerial TypeError: 유니코드 문자열이 지원되지 않습니다. 바이트로 인코딩하십시오:
에러 내용은 파이썬에서 시리얼 통신을 할 때 유니코드 문자열을 사용할 수 없다는 뜻입니다. 문자열을 바이트로 넘겨야 한다는데요. 파이썬에서 문자열을 바이트로 변환하는건 간단합니다. 아래 한줄로 처리가 가능하거든요.
mySerial.write(str.encode("0"))
추천0 비추천0
- 이전글cvc-elt.1.a: Cannot find the declaration of element 'project'. 22.02.21
- 다음글'Importing Maven projects' has encountered a problem invalid project description. 22.02.18
댓글목록
등록된 댓글이 없습니다.