Skip to content

IndexError: bytes index out of range #1056

Description

@MikeZhou-UofT

When I run the code simple.py on a Pi Pico.

I was getting "IndexError: bytes index out of range" after the internet was connected, but the MQTT broker connection failed.

From line 112 of simple.py: assert resp[0] == 0x20 and resp[1] == 0x02

It was saying "in connect" but afterward, it is giving me IndexError: bytes index out of range. Has anyone had this issue before?

What I have to do is unplug the USB and plug it back in multiple times to make it work.

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