Skip to content

recv_hdrs issue with parallel headers #36

@JoseThen

Description

@JoseThen

When following the documentation on parallel pages

gh_repos = pages(api.repos.list_for_org, api.last_page(), 'github').concat()
len(gh_repos)

I get the following error:

File "/workspaces/test/github.py", line 25, in <module>
    gh_repos = pages(api.repos.list_for_org, api.last_page(), 'github').concat()
  File "/home/vscode/.local/lib/python3.9/site-packages/ghapi/page.py", line 57, in last_page
    header = self.recv_hdrs.get('Link', '')
  File "/home/vscode/.local/lib/python3.9/site-packages/ghapi/core.py", line 116, in __getattr__
    def __getattr__(self,k): return self.groups[k] if 'groups' in vars(self) and k in self.groups else stop(AttributeError(k))
  File "/home/vscode/.local/lib/python3.9/site-packages/fastcore/basics.py", line 202, in stop
    raise e
AttributeError: recv_hdrs

Should I have extra parameters in my api initialization? I currently am just doing

api = GhApi(token="abunchofrandomchars")

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