This return code 500 is not related to the call to Canvas.  Python code checks if the course instance id exist in Coursemanager.  I added back an error message to the template to display if the course if not setup properly.  The purpose of the check is to keep Canvas and Coursemanager course ids in sync.  This check might or might not be needed, depending on future architecture.