Skip to content

Raspberry Pi 4: Type object 'str' has no attribute 'fromhex' #1

@adwinang

Description

@adwinang

Traceback (most recent call last): File "adwin.py", line 4, in <module> print(my_Var.command_request_knock()) File "/home/pi/Desktop/HuskyLens/HUSKYLENSPython/HUSKYLENS/huskylensPythonLibrary.py", line 178, in command_request_knock cmd = self.cmdToBytes(commandHeaderAndAddress+"002c3c") File "/home/pi/Desktop/HuskyLens/HUSKYLENSPython/HUSKYLENS/huskylensPythonLibrary.py", line 107, in cmdToBytes return bytes.fromhex(cmd) AttributeError: type object 'str' has no attribute 'fromhex'
I encountered this problem when I was running the test.py file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions