Repository: openstates/openstates-scrapers

Issue:
IL failing since at least 2017-06-04
IL has been failing since 2017-06-04

Based on automated runs it appears that IL has not run successfully in 2 days (2017-06-04).


```
  09:10:30 INFO pupa: save membership ~{"name": "Melissa Conyears-Ervin"} membership in bb07b3c2-49f8-11e7-8880-0242ac110004 as membership_bba38f4a-49f8-11e7-8880-0242ac110004.json
09:10:30 INFO pupa: save membership ~{"name": "John Cavaletto"} membership in bb07b3c2-49f8-11e7-8880-0242ac110004 as membership_bba38aea-49f8-11e7-8880-0242ac110004.json
09:10:30 INFO pupa: save membership ~{"name": "LaToya Greenwood"} membership in bb07b3c2-49f8-11e7-8880-0242ac110004 as membership_bba39774-49f8-11e7-8880-0242ac110004.json
09:10:30 INFO pupa: save membership ~{"name": "Jeanne M Ives"} membership in bb07b3c2-49f8-11e7-8880-0242ac110004 as membership_bba39b84-49f8-11e7-8880-0242ac110004.json
09:10:30 INFO pupa: save membership ~{"name": "Sheri Jesiel"} membership in bb07b3c2-49f8-11e7-8880-0242ac110004 as membership_bba39f9e-49f8-11e7-8880-0242ac110004.json
09:10:30 INFO pupa: save membership ~{"name": "Theresa Mah"} membership in bb07b3c2-49f8-11e7-8880-0242ac110004 as membership_bba3a3a4-49f8-11e7-8880-0242ac110004.json
09:10:30 INFO pupa: save membership ~{"name": "Michelle Mussman"} membership in bb07b3c2-49f8-11e7-8880-0242ac110004 as membership_bba3abba-49f8-11e7-8880-0242ac110004.json
09:10:30 INFO pupa: save membership ~{"name": "Emily McAsey"} membership in bb07b3c2-49f8-11e7-8880-0242ac110004 as membership_bba3a7aa-49f8-11e7-8880-0242ac110004.json
09:10:30 INFO pupa: save membership ~{"name": "Steven Reick"} membership in bb07b3c2-49f8-11e7-8880-0242ac110004 as membership_bba3afc0-49f8-11e7-8880-0242ac110004.json
09:10:30 INFO pupa: save membership ~{"name": "Dave Severin"} membership in bb07b3c2-49f8-11e7-8880-0242ac110004 as membership_bba3b3d0-49f8-11e7-8880-0242ac110004.json
09:10:30 INFO pupa: save membership ~{"name": "Justin Slaughter"} membership in bb07b3c2-49f8-11e7-8880-0242ac110004 as membership_bba3b7ea-49f8-11e7-8880-0242ac110004.json
09:10:30 INFO pupa: save membership ~{"name": "Joe Sosnowski"} membership in bb07b3c2-49f8-11e7-8880-0242ac110004 as membership_bba3bc36-49f8-11e7-8880-0242ac110004.json
09:10:30 INFO pupa: save membership ~{"name": "Cynthia Soto"} membership in bb07b3c2-49f8-11e7-8880-0242ac110004 as membership_bba3c082-49f8-11e7-8880-0242ac110004.json
09:10:30 INFO pupa: save membership ~{"name": "Emanuel Chris Welch"} membership in bb07b3c2-49f8-11e7-8880-0242ac110004 as membership_bba3c4c4-49f8-11e7-8880-0242ac110004.json
09:10:30 INFO scrapelib: GET - http://ilga.gov/house/committees/members.asp?CommitteeID=2166&GA=100
09:10:31 INFO pupa: save organization Insurance: Property & Casualty as organization_bba5768e-49f8-11e7-8880-0242ac110004.json
09:10:31 INFO pupa: save membership ~{"name": "Camille Y. Lilly"} membership in bba5768e-49f8-11e7-8880-0242ac110004 as membership_bc373290-49f8-11e7-8880-0242ac110004.json
09:10:31 INFO pupa: save membership ~{"name": "Melissa Conyears-Ervin"} membership in bba5768e-49f8-11e7-8880-0242ac110004 as membership_bc37384e-49f8-11e7-8880-0242ac110004.json
09:10:31 INFO pupa: save membership ~{"name": "Bill Mitchell"} membership in bba5768e-49f8-11e7-8880-0242ac110004 as membership_bc373d12-49f8-11e7-8880-0242ac110004.json
09:10:31 INFO pupa: save membership ~{"name": "Dan Brady"} membership in bba5768e-49f8-11e7-8880-0242ac110004 as membership_bc3741a4-49f8-11e7-8880-0242ac110004.json
09:10:31 INFO pupa: save membership ~{"name": "Laura Fine"} membership in bba5768e-49f8-11e7-8880-0242ac110004 as membership_bc374604-49f8-11e7-8880-0242ac110004.json
09:10:31 INFO pupa: save membership ~{"name": "Chad Hays"} membership in bba5768e-49f8-11e7-8880-0242ac110004 as membership_bc3752d4-49f8-11e7-8880-0242ac110004.json
09:10:31 INFO pupa: save membership ~{"name": "Gregory Harris"} membership in bba5768e-49f8-11e7-8880-0242ac110004 as membership_bc374e9c-49f8-11e7-8880-0242ac110004.json
09:10:31 INFO pupa: save membership ~{"name": "La Shawn K. Ford"} membership in bba5768e-49f8-11e7-8880-0242ac110004 as membership_bc374a50-49f8-11e7-8880-0242ac110004.json
09:10:31 INFO pupa: save membership ~{"name": "Lou Lang"} membership in bba5768e-49f8-11e7-8880-0242ac110004 as membership_bc375702-49f8-11e7-8880-0242ac110004.json
09:10:31 INFO pupa: save membership ~{"name": "Elaine Nekritz"} membership in bba5768e-49f8-11e7-8880-0242ac110004 as membership_bc375b3a-49f8-11e7-8880-0242ac110004.json
09:10:31 INFO pupa: save membership ~{"name": "Keith P. Sommer"} membership in bba5768e-49f8-11e7-8880-0242ac110004 as membership_bc375f68-49f8-11e7-8880-0242ac110004.json
09:10:31 INFO pupa: save membership ~{"name": "Michael D. Unes"} membership in bba5768e-49f8-11e7-8880-0242ac110004 as membership_bc37638c-49f8-11e7-8880-0242ac110004.json
no pupa_settings on path, using defaults
il (scrape)
  bills: {}
  committees: {}
  people: {}
Not checking sessions...
  File "/opt/openstates/venv-pupa/src/pupa/pupa/cli/__main__.py", line 67, in main
  File "/opt/openstates/venv-pupa//bin/pupa", line 11, in <module>
    load_entry_point('pupa', 'console_scripts', 'pupa')()
Traceback (most recent call last):
    subcommands[args.subcommand].handle(args, other)
  File "/opt/openstates/venv-pupa/src/pupa/pupa/cli/commands/update.py", line 277, in handle
    return self.do_handle(args, other, juris)
  File "/opt/openstates/venv-pupa/src/pupa/pupa/cli/commands/update.py", line 322, in do_handle
    report['scrape'] = self.do_scrape(juris, args, scrapers)
  File "/opt/openstates/venv-pupa/src/pupa/pupa/cli/commands/update.py", line 190, in do_scrape
    report[scraper_name] = scraper.do_scrape(**scrape_args)
  File "/opt/openstates/venv-pupa/src/pupa/pupa/scrape/base.py", line 102, in do_scrape
    for obj in self.scrape(**kwargs) or []:
  File "/opt/openstates/openstates/openstates/il/committees.py", line 89, in scrape
    committee['parent'] = top_level[committee['parent']]
KeyError: None
```

Visit http://bobsled.openstates.org for more info.



Discussion:

Resolving patch:
diff --git a/openstates/il/committees.py b/openstates/il/committees.py
--- a/openstates/il/committees.py
+++ b/openstates/il/committees.py
@@ -72,7 +72,7 @@ def scrape(self, latest_only=True):
                         committees[o_id]['parent'] = top_level_com
                     else:
                         committees[o_id]['chamber'] = chamber
-                        top_level = o_id
+                        top_level_com = o_id
 
         top_level = {o_id: committee for o_id, committee in
                      committees.items() if 'chamber' in committee}


Test patch: