Skip to content

Instantly share code, notes, and snippets.

@adelaide01
Created November 4, 2019 04:19
Show Gist options
  • Save adelaide01/6be070157507565bde039c24364eba9b to your computer and use it in GitHub Desktop.
Save adelaide01/6be070157507565bde039c24364eba9b to your computer and use it in GitHub Desktop.
console error
Scraping: Seminole - Supervisor of Elections
Writing results to JSON...
Updating the database...
True CDB1QRVM4 1572840708.000900
:red_siren: Error scraping Seminole - Supervisor of Elections
```Traceback (most recent call last):
File "/Users/adelaide/Desktop/elections-master/scripts/update.py", line 43, in updateRaceInfo
level=data[race]['level']
File "/Users/adelaide/Desktop/elections-master/virtualenv/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/Users/adelaide/Desktop/elections-master/virtualenv/lib/python3.7/site-packages/django/db/models/query.py", line 408, in get
self.model._meta.object_name
municipal2019.models.Race.DoesNotExist: Race matching query does not exist.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/adelaide/Desktop/elections-master/scripts/update.py", line 56, in updateRaceInfo
election_link=Election.objects.get(election_name='Municipal 2019')
File "/Users/adelaide/Desktop/elections-master/virtualenv/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/Users/adelaide/Desktop/elections-master/virtualenv/lib/python3.7/site-packages/django/db/models/query.py", line 408, in get
self.model._meta.object_name
municipal2019.models.Election.DoesNotExist: Election matching query does not exist.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/adelaide/Desktop/elections-master/scripts/update.py", line 89, in updateRaceInfo
race_link__level=level
File "/Users/adelaide/Desktop/elections-master/virtualenv/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/Users/adelaide/Desktop/elections-master/virtualenv/lib/python3.7/site-packages/django/db/models/query.py", line 408, in get
self.model._meta.object_name
municipal2019.models.Candidate.DoesNotExist: Candidate matching query does not exist.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/adelaide/Desktop/elections-master/scripts/main.py", line 79, in run
updateRaceInfo(data_source.data_source_slug)
File "/Users/adelaide/Desktop/elections-master/scripts/update.py", line 95, in updateRaceInfo
race_link=race_obj,
UnboundLocalError: local variable 'race_obj' referenced before assignment
```
Traceback (most recent call last):
File "/Users/adelaide/Desktop/elections-master/scripts/update.py", line 43, in updateRaceInfo
level=data[race]['level']
File "/Users/adelaide/Desktop/elections-master/virtualenv/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/Users/adelaide/Desktop/elections-master/virtualenv/lib/python3.7/site-packages/django/db/models/query.py", line 408, in get
self.model._meta.object_name
municipal2019.models.Race.DoesNotExist: Race matching query does not exist.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/adelaide/Desktop/elections-master/scripts/update.py", line 56, in updateRaceInfo
election_link=Election.objects.get(election_name='Municipal 2019')
File "/Users/adelaide/Desktop/elections-master/virtualenv/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/Users/adelaide/Desktop/elections-master/virtualenv/lib/python3.7/site-packages/django/db/models/query.py", line 408, in get
self.model._meta.object_name
municipal2019.models.Election.DoesNotExist: Election matching query does not exist.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/adelaide/Desktop/elections-master/scripts/update.py", line 89, in updateRaceInfo
race_link__level=level
File "/Users/adelaide/Desktop/elections-master/virtualenv/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/Users/adelaide/Desktop/elections-master/virtualenv/lib/python3.7/site-packages/django/db/models/query.py", line 408, in get
self.model._meta.object_name
municipal2019.models.Candidate.DoesNotExist: Candidate matching query does not exist.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/adelaide/Desktop/elections-master/scripts/main.py", line 79, in run
updateRaceInfo(data_source.data_source_slug)
File "/Users/adelaide/Desktop/elections-master/scripts/update.py", line 95, in updateRaceInfo
race_link=race_obj,
UnboundLocalError: local variable 'race_obj' referenced before assignment
SCRAPE DISABLED IN ADMIN: Lake - Supervisor of Elections
Script Run Time: 3.56
True CDB1QRVM4 1572840708.001000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment