Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue process is failing with TypeError #100

Open
caufieldjh opened this issue Jul 27, 2023 · 3 comments
Open

Issue process is failing with TypeError #100

caufieldjh opened this issue Jul 27, 2023 · 3 comments

Comments

@caufieldjh
Copy link
Contributor

The last couple of new entity request issues have been failing in GH Actions:

Run poetry run python ./.github/scripts/process_issue.py --github
Traceback (most recent call last):
  File "/home/runner/work/b2ai-standards-registry/b2ai-standards-registry/./.github/scripts/process_issue.py", line 556, in <module>
    main()
  File "/home/runner/.cache/pypoetry/virtualenvs/b2ai-standards-registry-euyZzU7C-py3.[9](https://github.com/bridge2ai/b2ai-standards-registry/actions/runs/5685383905/job/15410153912#step:6:10)/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/runner/.cache/pypoetry/virtualenvs/b2ai-standards-registry-euyZzU7C-py3.9/lib/python3.9/site-packages/click/core.py", line [10](https://github.com/bridge2ai/b2ai-standards-registry/actions/runs/5685383905/job/15410153912#step:6:11)55, in main
    rv = self.invoke(ctx)
  File "/home/runner/.cache/pypoetry/virtualenvs/b2ai-standards-registry-euyZzU7C-py3.9/lib/python3.9/site-packages/click/core.py", line [14](https://github.com/bridge2ai/b2ai-standards-registry/actions/runs/5685383905/job/15410153912#step:6:15)04, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/runner/.cache/pypoetry/virtualenvs/b2ai-standards-registry-euyZzU7C-py3.9/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/runner/work/b2ai-standards-registry/b2ai-standards-registry/./.github/scripts/process_issue.py", line 451, in main
    issue_to_resource = get_new_request_issues()
  File "/home/runner/work/b2ai-standards-registry/b2ai-standards-registry/./.github/scripts/process_issue.py", line 364, in get_new_request_issues
    data = get_b2ai_standards_registry_form_data(
  File "/home/runner/work/b2ai-standards-registry/b2ai-standards-registry/./.github/scripts/process_issue.py", line [22](https://github.com/bridge2ai/b2ai-standards-registry/actions/runs/5685383905/job/15410153912#step:6:23)2, in get_b2ai_standards_registry_form_data
    return get_form_data(
  File "/home/runner/work/b2ai-standards-registry/b2ai-standards-registry/./.github/scripts/process_issue.py", line [25](https://github.com/bridge2ai/b2ai-standards-registry/actions/runs/5685383905/job/15410153912#step:6:26)8, in get_form_data
    rv = {
  File "/home/runner/work/b2ai-standards-registry/b2ai-standards-registry/./.github/scripts/process_issue.py", line 259, in <dictcomp>
    issue["number"]: parse_body(issue["body"])
TypeError: string indices must be integers
Error: Process completed with exit code 1.

As the issue suggests, it's a type problem: looks like issue gets set to a string when it should be a dict.
Not certain why this started recently.

@caufieldjh
Copy link
Contributor Author

This is the problem - get_form_data is returning this for res_json:

{'message': 'Bad credentials', 'documentation_url': 'https://docs.github.com/rest'}

Check that token!

@caufieldjh
Copy link
Contributor Author

Refreshed token, re-ran action, looks like it works now.

@caufieldjh caufieldjh reopened this Jun 18, 2024
@caufieldjh
Copy link
Contributor Author

Process is failing again, so presumably it's due to an authentication error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant