Skip to content

AttributeError: 'NoneType' object has no attribute 'startswith' from get_user with 403 response #2158

@mriedem

Description

@mriedem

Looks like the same root issue as #1399 but that was closed and I can't re-open it (not sure why it was closed).

This is with pygithub 1.55:

  File "/home/travis/virtualenv/python3.8.1/lib/python3.8/site-packages/github/MainClass.py", line 256, in get_user
    headers, data = self.__requester.requestJsonAndCheck(
  File "/home/travis/virtualenv/python3.8.1/lib/python3.8/site-packages/github/Requester.py", line 353, in requestJsonAndCheck
    return self.__check(
  File "/home/travis/virtualenv/python3.8.1/lib/python3.8/site-packages/github/Requester.py", line 378, in __check
    raise self.__createException(status, responseHeaders, output)
  File "/home/travis/virtualenv/python3.8.1/lib/python3.8/site-packages/github/Requester.py", line 418, in __createException
    elif status == 403 and output.get("message").startswith(
AttributeError: 'NoneType' object has no attribute 'startswith'

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