marge-bot: TypeError: 'NoneType' object is not subscriptable
We’re trying to get marge-bot up and running on our own gitlab instance, and might have found a bug?
> marge/project.py
>> return AccessLevel(self.info['permissions']['project_access']['access_level'])
>> TypeError: 'NoneType' object is not subscriptable
After looking into this a bit, it looks like gitlabs api will return permissions only on the /projects/:id request, but not for /projects.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (14 by maintainers)
Commits related to this issue
- #19 - NoneType on project level access. Fall back to group level access. Handle none access more gracefully — committed to david-duncan/marge-bot by david-duncan 7 years ago
- #19 - Fallback to group level access — committed to david-duncan/marge-bot by david-duncan 7 years ago
- #19 - Fallback to group level access — committed to smarkets/marge-bot by david-duncan 7 years ago
I think we can close this now, as the fix has made it into master.
Believe it or not but some projects the user has access to come back with an empty permissions array:
Even though the user is a master on the group. We tracked this down to a gitlab bug that we have not reported(or found the issue tracking) where subgroups getting moved do not cascade proper permissions down.
So we removed our user from these groups and manually re-added. Now we still have group level access
I see two things needing to happen here: