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

(LTI Setup) Cron fails when valid courses are 0: local variable 'exception_in_run' referenced before assignment #1547

Open
jaydonkrooss opened this issue Oct 18, 2023 · 0 comments

Comments

@jaydonkrooss
Copy link
Contributor

Expected behavior (A description of what you expected to happen) :

While setting up local development via LTI, inserting data using the cron job script (instructions) should result in data being imported into local mySQL for myLA.

Describe the bug (Tell us what happens instead of the expected behavior) :

I created my own course in beta to test the LTI integration, but when running the cron job, one of the errors I encountered was local variable 'exception_in_run' referenced before assignment. This was a result of the script skipping course-related table updates for my newly created course, resulting in the else condition not proceeding with creating the exception_in_run variable. Identify why the newly created course was invalid and properly handle this case: either throw a descriptive error or continue the script with the singular course if it should be valid in this conditional code.

Steps to Reproduce :

  1. Create a new course that is unpublished in canvas beta, follow all steps to configure your local instance of MyLA via LTI.
  2. Attempt to run the cron job: https://github.com/tl-its-umich-edu/my-learning-analytics/blob/master/docs/loading_data.md
  3. Check the django_cron_cronjoblog table in MySQL for a full description of the logged errors.

Screenshots/Video (If possible, add media to help explain your problem) :

Screenshot 2023-10-18 at 12 10 18 PM

Additional context (Add any other context about the problem here) :

It is possible that this relates to other issues I had during set up. One step I had to take was to reset my data by deleting the local .data folder before restarting my server, so this may be a step needed to reproduce this issue.

@jaydonkrooss jaydonkrooss changed the title (LTI Setup) local variable 'exception_in_run' referenced before assignment (LTI Setup) Cron fails when valid courses are 0: local variable 'exception_in_run' referenced before assignment Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant