mkomon/uota

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

Opened this issue · 0 comments

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.