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

AttributeError: 'str' object has no attribute 'encode' #9

Closed
@Arukaito

Description

@Arukaito

Circuit Python Version : Adafruit CircuitPython 4.0.0-alpha.5 on 2018-12-10; Adafruit Metro M0 Express with samd21g18
Thermal Printer Version : circuitpython-thermal-printer-4.x-mpy-1.1.2.zip

Im trying to run the example printer code & my code without luck

Example
and it returns this

main.py output:
Traceback (most recent call last):
  File "main.py", line 32, in <module>
  File "adafruit_thermal_printer/thermal_printer.py", line 187, in __init__
  File "adafruit_thermal_printer/thermal_printer.py", line 289, in reset
  File "adafruit_thermal_printer/thermal_printer.py", line 241, in send_command
AttributeError: 'str' object has no attribute 'encode'

The same error occurs with my code and the example code.
Im doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions