I'm looking for a way to import outcomes to the account level, perhaps using Python. I found a script but it has errors. Can anyone help? I found a couple of things on Github but can't get them to work.
I'm looking for a way to import outcomes to the account level, perhaps using Python. I found a script but it has errors. Can anyone help? I found a couple of things on Github but can't get them to work.
Howdy Gregg,
Would you possibly be able to share the repos you have found, and the issues you have experienced, I will admit I have not done this with the API before, but I have done a little bit on Python so may be able to help point you in the direction.
The more detail you can provide about what issues you faced would be great, sometimes a great way to start it by pulling a few scripts together, other times I have found sometimes a little deeper troubleshooting is needed.
Look forward to hearing from you!
Cheers,
Stuart
Hey Stuart,
Thanks for jumping in!
We are trying to mass import a batch of account level outcomes into our Canvas Beta environment (if/when it works, we will replicate in our production site). We found a post in the Canvas Community where someone used an API call and Python to do this, but we have been unsuccessful.
So far, we have created the CSV file using the given headers and our outcome information, changed the script to include our (Beta) domain, and provided the token from our Beta site.
I downloaded the files from https://github.com/mcjelewis/CanvasPY.
I made the edits and formatted the csv file.
I'm running Windows 8.1 Pro 64 bit.
Here's the error:
Traceback (most recent call last):
File "outcome_importer.py", line 246, in <module>
r = canvas.addGroup(domain, token, x,parentGroupID,apiType)
File "C:\Users\gbibb\AppData\Local\Programs\Python\Python36\canvas-python\canv
asConnect\api_outcomes.py", line 94, in addGroup
parent_id = rootOutcomeGroup['id']
NameError: name 'rootOutcomeGroup' is not defined
Hi Gregg,
No worries at all, could you possibly provide me the top two lines from your CSV as an example as that will help me get all up and running to give this a go. Oddly enough it may be related, and hence I like to make sure I am using the same environment to play in. Also, what version of Python are you using for this? (as I don't have a Windows 8.1 machine, I will test against the same version of Python, or as close as possible). Sometimes these things are as simple as changing the major version of Python that you are using, if things are written for one and not the other.
Look forward to hearing from you.
Cheers,
Stuart
Hi, Gregg, I don't have an immediate answer for you, but given the technical nature of the prompt, I've shared it with the experts in the Canvas Developers and Canvas Admins groups. You won't need to join those groups to see their replies as they come in, but if you'd like to join them, you can easily do so by clicking on the links and selecting Join Group from the Actions dropdown at the upper right of each group home page.