-
Notifications
You must be signed in to change notification settings - Fork 175
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
Course.get_enabled_features throws AttributeError: 'str' object has no attribute 'update' #584
Comments
I did some digging tonight and it throws an error because the A hotfix would be to build your own request using |
The library expected a paginated response from Canvas, but the API returns a list of strings for features enabled. This updates the library to return plain JSON instead of a `PaginatedList` for the account, course, and user modules.
Update account, course, and user modules to return JSON instead of a paginated list.
Formatting fixes for several files When requesting enabled features, Canvas returns a list of strings for each feature instead of objects. This refactors the account, course, and user modules to return JSON instead of a `PaginatedList`.
Describe the bug
When trying to access the enabled features for a course using Course.get_enabled_features, an AttributeError is thrown. Full output from an ipython session is below. I am guessing that this is because the API call to
/features/enabled
does not return output in the same format as the call to/features
(seecurl
output below), but I have not been able to verify that this is the cause of the problem.To Reproduce
Steps to reproduce the behavior:
Expected behavior
get_enabled_features() should return a response of the same format as get_features()
Environment information
Additional context
The API call to
/features/enabled
returns a simple list as output, rather than a full dict of feature information.This is confirmed by the Canvas API docs: https://canvas.instructure.com/doc/api/feature_flags.html#method.feature_flags.enabled_features.
The text was updated successfully, but these errors were encountered: