CivicTechAtlanta / georgia-courtbot

Helping people remember to attend court to help break the cycle of fines and jail time
4 stars 5 forks source link

Add CaseNumber and JudicialOfficer to extracted field set. #12

Closed abrie closed 2 years ago

abrie commented 2 years ago

This PR addresses the missing fields noted in Issue #5. It adds CaseNumber and JudicialOfficer.

bbrewington commented 2 years ago

did a test run locally and got an error (I'm glad to look into it, but just sharing along for now)

% source venv/bin/activate
% pip install -r requirements.txt
% python3 dekalb_scraper.py --output csv > dekalb_scrape_202201180929.csv

Output:

Scraping Dekalb County court cases per judicial officer...
ID  Name
282 Adams, Gregory A.
Traceback (most recent call last):
  File "dekalb_scraper.py", line 149, in <module>
    run(args.output)
  File "dekalb_scraper.py", line 123, in run
    for fields in fields_of_interest
  File "dekalb_scraper.py", line 123, in <listcomp>
    for fields in fields_of_interest
TypeError: unsupported operand type(s) for |: 'dict' and 'dict'
abrie commented 2 years ago

Which version of Python are you using? The | operand is only present in Python 3.9+.

bbrewington commented 2 years ago

mine is 3.7.9

Options:

  1. put a note in README.md saying Python 3.9 is requirement
  2. refactor so it's compatible with 3.7

thoughts on which approach is bettter?

bbrewington commented 2 years ago

going forward w/ running a test using Python 3.9 (it's working so far) - will document that requirement in README. note to self: using virtualenv to run different Python versions

bbrewington commented 2 years ago

Succeeded, merging