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

get_appointment_groups is broken #678

Closed
eric-vader opened this issue Dec 18, 2024 · 2 comments
Closed

get_appointment_groups is broken #678

eric-vader opened this issue Dec 18, 2024 · 2 comments
Labels

Comments

@eric-vader
Copy link

Describe the bug

get_appointment_groups API is broken.

To Reproduce

Steps to reproduce the behavior:

  1. Go onto Canvas, create an appointment group
  2. canvas.get_appointment_groups() does not yield results (ie. it is empty)

Although, canvas.get_appointment_group(id=id) does work as expected.

Expected behavior

canvas.get_appointment_groups() should not return an empty array and should return the appointment group obj.

Environment information

  • Python version (python --version) Python 3.12.4
  • CanvasAPI version (pip show canvasapi) 3.3.0

Additional context

I couldnt get create_appointment_group to work properly as well (cannot create appointment), not sure if it is related.

@eric-vader eric-vader added the bug label Dec 18, 2024
@bennettscience
Copy link
Contributor

Can you try a couple things?

  1. When you try to use canvas.create_appointment_group, are you passing it a course context code? This is required according to the Canvas docs. A sample of your script may help identify the problem.
  2. When you request appointment groups, are you passing it a scope? If the scope is missing, Canvas defaults to "reservable," but if there are none, it would result in an empty list.

@eric-vader
Copy link
Author

I have followed your suggestions and have managed to make it work. Thanks so much!

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

No branches or pull requests

2 participants