Repository: openstates/openstates-scrapers

Issue:
HI failing since at least 2018-04-04
HI has been failing since 2018-04-04

Based on automated runs it appears that HI has not run successfully in 2 days (2018-04-04).


```
  05:08:55 INFO pupa: save bill HB964 in 2018 Regular Session as bill_5943dd22-38b9-11e8-8200-024478004d6e.json
05:08:55 INFO scrapelib: GET - http://capitol.hawaii.gov/Archives/measure_indiv_Archives.aspx?billtype=HB&billnumber=965&year=2018
05:08:56 INFO pupa: save bill HB965 in 2018 Regular Session as bill_59dbb502-38b9-11e8-8200-024478004d6e.json
05:08:56 INFO scrapelib: GET - http://capitol.hawaii.gov/Archives/measure_indiv_Archives.aspx?billtype=HB&billnumber=966&year=2018
05:08:57 INFO pupa: save bill HB966 in 2018 Regular Session as bill_5a7d2522-38b9-11e8-8200-024478004d6e.json
05:08:57 INFO scrapelib: GET - http://capitol.hawaii.gov/Archives/measure_indiv_Archives.aspx?billtype=HB&billnumber=967&year=2018
05:08:58 INFO pupa: save vote_event 2018 Regular Session - 2017-02-09 - The committees on HED recommend that the measure be PASSED, WITH AMENDMENTS. as vote_event_5b0ed9fe-38b9-11e8-8200-024478004d6e.json
05:08:58 INFO pupa: save bill HB967 in 2018 Regular Session as bill_5b0ea6c8-38b9-11e8-8200-024478004d6e.json
05:08:58 INFO scrapelib: GET - http://capitol.hawaii.gov/Archives/measure_indiv_Archives.aspx?billtype=HB&billnumber=968&year=2018
05:08:59 INFO pupa: save vote_event 2018 Regular Session - 2017-02-07 - The committees on HSG recommend that the measure be PASSED, WITH AMENDMENTS. as vote_event_5ba68d1c-38b9-11e8-8200-024478004d6e.json
05:08:59 INFO pupa: save bill HB968 in 2018 Regular Session as bill_5ba65d88-38b9-11e8-8200-024478004d6e.json
05:08:59 INFO scrapelib: GET - http://capitol.hawaii.gov/Archives/measure_indiv_Archives.aspx?billtype=HB&billnumber=969&year=2018
05:09:00 INFO pupa: save bill HB969 in 2018 Regular Session as bill_5c3e4738-38b9-11e8-8200-024478004d6e.json
05:09:00 INFO scrapelib: GET - http://capitol.hawaii.gov/Archives/measure_indiv_Archives.aspx?billtype=HB&billnumber=970&year=2018
05:09:01 INFO pupa: save bill HB970 in 2018 Regular Session as bill_5ce3c230-38b9-11e8-8200-024478004d6e.json
05:09:01 INFO scrapelib: GET - http://capitol.hawaii.gov/Archives/measure_indiv_Archives.aspx?billtype=HB&billnumber=971&year=2018
05:09:02 INFO pupa: save bill HB971 in 2018 Regular Session as bill_5d74ecc4-38b9-11e8-8200-024478004d6e.json
05:09:02 INFO scrapelib: GET - http://capitol.hawaii.gov/Archives/measure_indiv_Archives.aspx?billtype=HB&billnumber=972&year=2018
05:09:04 INFO pupa: save bill HB972 in 2018 Regular Session as bill_5e8074ee-38b9-11e8-8200-024478004d6e.json
05:09:04 INFO scrapelib: GET - http://capitol.hawaii.gov/Archives/measure_indiv_Archives.aspx?billtype=HB&billnumber=973&year=2018
05:09:04 INFO pupa: save vote_event 2018 Regular Session - 2017-02-08 - The committees on EDB recommend that the measure be PASSED, WITH AMENDMENTS. as vote_event_5efb9408-38b9-11e8-8200-024478004d6e.json
05:09:04 INFO pupa: save vote_event 2018 Regular Session - 2017-02-22 - The committees on FIN recommend that the measure be PASSED, UNAMENDED. as vote_event_5efbda08-38b9-11e8-8200-024478004d6e.json
05:09:04 INFO pupa: save vote_event 2018 Regular Session - 2017-03-13 - The committee(s) on  ETT recommend(s) that the measure be PASSED, WITH AMENDMENTS. as vote_event_5efc3336-38b9-11e8-8200-024478004d6e.json
loaded Open States pupa settings...
hi (scrape, import)
  bills: {}
  committees: {}
  people: {}
Traceback (most recent call last):
  File "/opt/openstates/venv-pupa//bin/pupa", line 11, in <module>
    load_entry_point('pupa', 'console_scripts', 'pupa')()
  File "/opt/openstates/venv-pupa/src/pupa/pupa/cli/__main__.py", line 68, in main
    subcommands[args.subcommand].handle(args, other)
  File "/opt/openstates/venv-pupa/src/pupa/pupa/cli/commands/update.py", line 260, in handle
    return self.do_handle(args, other, juris)
  File "/opt/openstates/venv-pupa/src/pupa/pupa/cli/commands/update.py", line 305, in do_handle
    report['scrape'] = self.do_scrape(juris, args, scrapers)
  File "/opt/openstates/venv-pupa/src/pupa/pupa/cli/commands/update.py", line 173, in do_scrape
    report[scraper_name] = scraper.do_scrape(**scrape_args)
  File "/opt/openstates/venv-pupa/src/pupa/pupa/scrape/base.py", line 111, in do_scrape
    for obj in self.scrape(**kwargs) or []:
  File "/opt/openstates/openstates/openstates/hi/bills.py", line 258, in scrape
    yield from self.scrape_type(chamber, session, typ)
  File "/opt/openstates/openstates/openstates/hi/bills.py", line 247, in scrape_type
    yield from self.scrape_bill(session, chamber, billtype_map, bill_url)
  File "/opt/openstates/openstates/openstates/hi/bills.py", line 212, in scrape_bill
    yield from self.parse_bill_actions_table(b, action_table, bill_id, session, url, chamber)
  File "/opt/openstates/openstates/openstates/hi/bills.py", line 104, in parse_bill_actions_table
    }[actor]
KeyError: 's'
```

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



Discussion:
Looking into it.

Resolving patch:
diff --git a/openstates/hi/bills.py b/openstates/hi/bills.py
--- a/openstates/hi/bills.py
+++ b/openstates/hi/bills.py
@@ -93,14 +93,14 @@ def parse_bill_actions_table(self, bill, action_table, bill_id, session, url, bi
         for action in action_table.xpath('*')[1:]:
             date = action[0].text_content()
             date = dt.datetime.strptime(date, "%m/%d/%Y").strftime('%Y-%m-%d')
-            actor = action[1].text_content()
+            actor = action[1].text_content().upper()
             string = action[2].text_content()
             actor = {
                 "S": "upper",
                 "H": "lower",
                 "D": "legislature",  # "Data Systems",
                 "$": "Appropriation measure",
-                "ConAm": "Constitutional Amendment"
+                "CONAM": "Constitutional Amendment"
             }[actor]
             act_type, committees = categorize_action(string)
             # XXX: Translate short-code to full committee name for the


Test patch: