Repository: openstates/openstates-scrapers

Issue:
MO failing since at least 2018-12-09
MO has been failing since 2018-12-09

Based on automated runs it appears that MO has not run successfully in 2 days (2018-12-09).


```
  06:11:33 INFO pupa: SB158
06:11:33 INFO scrapelib: GET - https://www.senate.mo.gov/19info/BTS_Web/Actions.aspx?SessionType=R&BillID=20875
06:11:34 INFO scrapelib: GET - https://www.senate.mo.gov/19info/BTS_Web/BillText.aspx?SessionType=R&BillID=20875
06:11:35 INFO pupa: save bill SB 158 in 2019 as bill_716103c4-fc42-11e8-b9f8-02f1fb7ee550.json
06:11:35 INFO scrapelib: GET - http://www.senate.mo.gov/19info/BTS_Web/Bill.aspx?SessionType=R&BillID=39332
06:11:36 INFO pupa: SB159
06:11:36 INFO scrapelib: GET - https://www.senate.mo.gov/19info/BTS_Web/Actions.aspx?SessionType=R&BillID=39332
06:11:37 INFO scrapelib: GET - https://www.senate.mo.gov/19info/BTS_Web/BillText.aspx?SessionType=R&BillID=39332
06:11:38 INFO pupa: save bill SB 159 in 2019 as bill_732da4be-fc42-11e8-b9f8-02f1fb7ee550.json
06:11:38 INFO scrapelib: GET - http://www.senate.mo.gov/19info/BTS_Web/Bill.aspx?SessionType=R&BillID=39145
06:11:39 INFO pupa: SB160
06:11:39 INFO scrapelib: GET - https://www.senate.mo.gov/19info/BTS_Web/Actions.aspx?SessionType=R&BillID=39145
06:11:40 INFO scrapelib: GET - https://www.senate.mo.gov/19info/BTS_Web/BillText.aspx?SessionType=R&BillID=39145
06:11:41 INFO pupa: save bill SB 160 in 2019 as bill_74f5473e-fc42-11e8-b9f8-02f1fb7ee550.json
06:11:41 INFO scrapelib: GET - http://www.senate.mo.gov/19info/BTS_Web/Bill.aspx?SessionType=R&BillID=51423
06:11:42 INFO pupa: SB161
06:11:42 INFO scrapelib: GET - https://www.senate.mo.gov/19info/BTS_Web/Actions.aspx?SessionType=R&BillID=51423
06:11:43 INFO scrapelib: GET - https://www.senate.mo.gov/19info/BTS_Web/BillText.aspx?SessionType=R&BillID=51423
06:11:44 INFO pupa: save bill SB 161 in 2019 as bill_76bf4ed4-fc42-11e8-b9f8-02f1fb7ee550.json
06:11:44 INFO scrapelib: GET - http://www.senate.mo.gov/19info/BTS_Web/Bill.aspx?SessionType=R&BillID=53657
06:11:45 INFO pupa: SB162
06:11:45 INFO scrapelib: GET - https://www.senate.mo.gov/19info/BTS_Web/Actions.aspx?SessionType=R&BillID=53657
06:11:46 INFO scrapelib: GET - https://www.senate.mo.gov/19info/BTS_Web/BillText.aspx?SessionType=R&BillID=53657
06:11:47 INFO pupa: save bill SB 162 in 2019 as bill_788977b2-fc42-11e8-b9f8-02f1fb7ee550.json
06:11:47 INFO scrapelib: GET - http://www.senate.mo.gov/19info/BTS_Web/Bill.aspx?SessionType=R&BillID=53656
06:11:48 INFO pupa: XXXXXX
loaded Open States pupa settings...
mo (scrape, import)
  bills: {}
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 274, in handle
    return self.do_handle(args, other, juris)
  File "/opt/openstates/venv-pupa/src/pupa/pupa/cli/commands/update.py", line 320, in do_handle
    report['scrape'] = self.do_scrape(juris, args, scrapers)
  File "/opt/openstates/venv-pupa/src/pupa/pupa/cli/commands/update.py", line 175, in do_scrape
    report[scraper_name] = scraper.do_scrape(**scrape_args)
  File "/opt/openstates/venv-pupa/src/pupa/pupa/scrape/base.py", line 112, in do_scrape
    for obj in self.scrape(**kwargs) or []:
  File "/opt/openstates/openstates/openstates/mo/bills.py", line 627, in scrape
    yield from self._scrape_upper_chamber(session)
  File "/opt/openstates/openstates/openstates/mo/bills.py", line 600, in _scrape_upper_chamber
    session,
  File "/opt/openstates/openstates/openstates/mo/bills.py", line 193, in _parse_senate_billpage
    action_url = action_url[0].attrib['href']
  File "src/lxml/etree.pyx", line 2457, in lxml.etree._Attrib.__getitem__
KeyError: 'href'
```

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



Discussion:
I'm working on this.

Resolving patch:
diff --git a/openstates/mo/bills.py b/openstates/mo/bills.py
--- a/openstates/mo/bills.py
+++ b/openstates/mo/bills.py
@@ -157,6 +157,10 @@ def _parse_senate_billpage(self, bill_url, year):
 
         self.info(bid)
 
+        if bid == 'XXXXXX':
+            self.info("Skipping Junk Bill")
+            return
+
         bill = Bill(
             bill_id,
             title=bill_desc,


Test patch: