Thanks to visit codestin.com
Credit goes to github.com

Skip to content

JSON decoder error #3459

@dchassin

Description

@dchassin

This error happens when a large number of repos are encountered. Since it requires authentication I cannot provide reproducible code but the simple demo will do this if you authenticate to a user who can access a large number of repos.

Traceback (most recent call last):
  Cell 
marimo://notebook.py#cell=cell-2
, line 1, in <module>
    for repo in gh.get_user().get_repos():
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/github/PaginatedList.py", line 98, in __iter__
    newElements = self._grow()
                  ^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/github/PaginatedList.py", line 109, in _grow
    newElements = self._fetchNextPage()
                  ^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/github/PaginatedList.py", line 338, in _fetchNextPage
    headers, data = self.__requester.requestJsonAndCheck(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/github/Requester.py", line 623, in requestJsonAndCheck
    return self.__check(
           ^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/github/Requester.py", line 851, in __check
    data = self.__structuredFromJson(output)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.12/site-packages/github/Requester.py", line 970, in __structuredFromJson
    return json.loads(data)
           ^^^^^^^^^^^^^^^^
  File "/lib/python312.zip/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python312.zip/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python312.zip/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
               ^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Unterminated string starting at: line 2973 column 19 (char 162239)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions