Python local config file not found error when running code


#1

When running my code I get this message from my debug block. My question has to do with how to create a local config file that will work on Cloud 9? I’m not sure where the directory reference ‘/path/to/working/folder/archives’ comes from as its not in my code anywhere.

:~/workspace/canvas (master) $ python coursecopy.py
local config file not found
Traceback (most recent call last):
File “coursecopy.py”, line 149, in
os.mkdir(archivePath)
OSError: [Errno 2] No such file or directory: ‘/path/to/working/folder/archives’


#2

Would be easier for us to help you if you can share the code in coursecopy.py


#3

Sorry for the late response. I think that the local config file referenced may not be required, but is an option in the code in case there is one with specific instructions about the local environment.

I pulled this from GitHub to help us apply a template to all courses in Canvas.

Thanks for taking a look!

The original code is here:


#4

Work has been crazy! and I finally am able to get back to this question. The code is the same (in the above post) and here is the error I’m getting. I’ve since added the archives directory and the logs directory, but I still get the error.

local config file not found
Traceback (most recent call last):
File “coursecopy.py”, line 149, in
os.mkdir(archivePath)
OSError: [Errno 2] No such file or directory: ‘/canvas/api/do_course_copy/python_multiprocessing/archives’