Skip to content

TypeError: unsupported types for __add__: 'str', 'int' #11

@lgb-this

Description

@lgb-this

I try to use uota on a Raspberry Pi Pico W with the latest build of Micropython. I get this error:

Traceback (most recent call last):
  File "<stdin>", line 95, in <module>
  File "/lib/uota.py", line 114, in check_for_updates
TypeError: unsupported types for __add__: 'str', 'int'

The problem is here:

    if response.status_code != 200:
        log.error('Other error: ' + response.status_code + " " + response.reason)  # line 114
        return False

I modified the code in this way:

    if response.status_code != 200:
        log.error('Other error: ' + str(response.status_code) + " " + response.reason.decode())
        return False

The code seems to be ok now.

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