recv_hdrs issue with parallel headers
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with the documentation example using GhApi, pages, and api.last_page(), then inspect ghapi/page.py at last_page and ghapi/core.py where recv_hdrs is accessed. Trace how the parallel-pages request populates response headers and compare that with the example. Done means the documented example no longer raises AttributeError.
Written by the indexing model from the issue text.
Description
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")
- Dominant language
- Python
- Stars
- 687
- Forks
- 69
- Avg merge
- 1m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AnswerDotAI/ghapi
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
AnswerDotAI/ghapi#158 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AnswerDotAI/ghapi#120 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
AnswerDotAI/ghapi#208 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
AnswerDotAI/ghapi#201 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
AnswerDotAI/ghapi#186 ·
All issues in AnswerDotAI/ghapi
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Openarea: ci bug perceived difficulty: 3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/clickhouse-connect#1057 ·