rcackerman / parole-hearing-data

http://www.parolehearingdata.org/
21 stars 12 forks source link

Existing `data.csv` doesn't work because of lack of headers #26

Closed talos closed 9 years ago

talos commented 9 years ago

If one tries to run python scrape.py with the data.csv in the repo, the following error occurs:

Traceback (most recent call last):
  File "scrape.py", line 76, in <module>
    urls_to_visit = generate_baseurl()
  File "scrape.py", line 50, in generate_baseurl
    monthsyears = fill_in_the_blanks()
  File "scrape.py", line 39, in fill_in_the_blanks
    last_scrape = get_last_scrape_date('data.csv') 
  File "scrape.py", line 28, in get_last_scrape_date
    i = r.fieldnames.index('Scrape_Date')
ValueError: 'Scrape_Date' is not in list

data.csv has no headers in it, so the CSV DictReader isn't able to identify column names. It's not clear looking at the file what the headers are, unfortunately.

talos commented 9 years ago

Looks like this is related to #27 and would probably be fixed with that.

rcackerman commented 9 years ago

Fixed by ce73daa0