Skip to content

urequests: Compatibility with CPython #379

Closed
@amotl

Description

@amotl

Hi there,

when invoking the urequests module on CPython, it will croak with

TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'str'

when starting to write to the socket stream:

s.write(b"%s /%s HTTP/1.0\r\n" % (method, path))

This has also been reported on adafruit/Adafruit_CircuitPython_Requests#10 and was fixed by adafruit/Adafruit_CircuitPython_Requests#11.

With kind regards,
Andreas.

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