Skip to content

Code Editor has trouble handling byte strings. #312

Open
@phesterman

Description

@phesterman

CircuitPython Version

Adafruit CircuitPython 9.2.7 on 2025-04-01; 01Space 0.42 OLED ESP32C3 with ESP32-C3FH4

Workflow(s)

USB

Browser(s)

Google Chrome Version 136.0.7103.93 (Official Build) (arm64) on MacOS Sequoia 15.4.1

Console Log

Steps

The code editor seems to garble byte strings, so that something like this (that works in Thonny) generates an error:

peer = espnow.Peer(mac=b'\x18\x37\x2F\x52\x7C\x7C') [this is a made-up MAC address]

Save + Run produces "ValueError: buffer length must be 6" on that line. After closing and reopening the file, I discovered that the code editor has changed the line to:

peer = espnow.Peer(mac=b'00ù3�È') [this is the actual line from the code editor]

Description

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions