I am using the API to create folders. Calls to course.create_folder intermittently fail, without errors
To Reproduce
Steps to reproduce the behavior, starting from a course with no files or folders, do the following
course = canvas.get_course(my_course_id)
for week in range(1, 17):
print("[*] {}".format(week))
parent = "/week{}/".format(week)
course.create_folder(name='quiz_files', parent_folder_path=parent)
course.create_folder(name='assignment_files', parent_folder_path=parent)
course.create_folder(name='other_files', parent_folder_path=parent)
Expected behavior
I would expect to see 16 folders called week1, week2 ... week17, each with 3 subfolders called quiz_files, assignment_files and other_files. If I click each week1 folder etc in the web interface only some weekN folders have all of the 3 subdirectories. If the directories do not exist, I would expect to get an error message.
The Canvas endpoint returns a folder when it is successful. Have you tried adding any flow control checks that each folder was successfully created before trying to add a subfolder?
Describe the bug
I am using the API to create folders. Calls to
course.create_folder
intermittently fail, without errorsTo Reproduce
Steps to reproduce the behavior, starting from a course with no files or folders, do the following
Expected behavior
I would expect to see 16 folders called week1, week2 ... week17, each with 3 subfolders called quiz_files, assignment_files and other_files. If I click each week1 folder etc in the web interface only some weekN folders have all of the 3 subdirectories. If the directories do not exist, I would expect to get an error message.
Environment information
3.7.7
)