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

TypeError: list indices must be integers or slices, not str #20

Open
tobes64 opened this issue Jan 28, 2022 · 0 comments
Open

TypeError: list indices must be integers or slices, not str #20

tobes64 opened this issue Jan 28, 2022 · 0 comments

Comments

@tobes64
Copy link

tobes64 commented Jan 28, 2022

Whilst running the GitHub Organizer came across an issue for the update_repository_settings function within the githuborganizer/tasks/github.py file

2022-01-28 16:51:12,955: INFO/ForkPoolWorker-72] JSON was returned
[2022-01-28 16:51:12,957: INFO/ForkPoolWorker-72] Task githuborganizer.tasks.github.update_repository_settings[140d0010-007c-46c5-9824-0f30e0c5df1d] succeeded in 1.4389273878186941s: None
[2022-01-28 16:51:12,958: WARNING/ForkPoolWorker-72] Updating the dependency security settings of repository concat/test.
[2022-01-28 16:51:12,976: ERROR/ForkPoolWorker-67] Task githuborganizer.tasks.github.update_organization_teams[c96d1ae8-47cf-49fd-8c8d-efb430ab1ba3] raised unexpected: TypeError('list indices must be integers or slices, not str',)
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 412, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 704, in __protected_call__
    return self.run(*args, **kwargs)
  File "/app/githuborganizer/tasks/github.py", line 137, in update_organization_teams
    repo_permissions = gh.team_has_repositories(org.client.app, ghteam)
  File "/app/githuborganizer/models/gh.py", line 49, in team_has_repositories
    repositories[repo['name']] = []
TypeError: list indices must be integers or slices, not str
[2022-01-28 16:51:12,997: INFO/ForkPoolWorker-71] JSON was returned
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

No branches or pull requests

1 participant