Repository: openstates/openstates-scrapers

Issue:
MA failing since at least 2017-09-23
MA has been failing since 2017-09-23

Based on automated runs it appears that MA has not run successfully in 2 days (2017-09-23).


```
  03:01:51 INFO pupa: save bill H3794 in 190th as bill_9f314d68-a0fe-11e7-aa77-0242ac110005.json
03:01:53 INFO pupa: save bill H3795 in 190th as bill_a08991e8-a0fe-11e7-aa77-0242ac110005.json
03:01:56 INFO pupa: save bill H3796 in 190th as bill_a2181f0c-a0fe-11e7-aa77-0242ac110005.json
03:02:01 INFO pupa: save bill H3848 in 190th as bill_a5134fce-a0fe-11e7-aa77-0242ac110005.json
03:02:04 INFO pupa: save bill H3832 in 190th as bill_a69e6504-a0fe-11e7-aa77-0242ac110005.json
03:02:07 INFO pupa: save bill H3872 in 190th as bill_a86d2b7c-a0fe-11e7-aa77-0242ac110005.json
03:02:09 INFO pupa: save bill H3834 in 190th as bill_a9ebad0c-a0fe-11e7-aa77-0242ac110005.json
03:02:12 INFO pupa: save bill H3815 in 190th as bill_ab9307a4-a0fe-11e7-aa77-0242ac110005.json
03:02:15 INFO pupa: save bill H3814 in 190th as bill_ad2f2b56-a0fe-11e7-aa77-0242ac110005.json
03:02:17 INFO pupa: save bill H3865 in 190th as bill_aee1bb3a-a0fe-11e7-aa77-0242ac110005.json
03:02:21 INFO pupa: save bill H3799 in 190th as bill_b0c08eb8-a0fe-11e7-aa77-0242ac110005.json
03:02:23 INFO pupa: save bill H3831 in 190th as bill_b255dcec-a0fe-11e7-aa77-0242ac110005.json
03:02:26 INFO pupa: save bill H3836 in 190th as bill_b40838e6-a0fe-11e7-aa77-0242ac110005.json
03:02:29 INFO pupa: save bill H3887 in 190th as bill_b5c770d4-a0fe-11e7-aa77-0242ac110005.json
03:02:32 INFO pupa: save bill H3863 in 190th as bill_b7a4fda4-a0fe-11e7-aa77-0242ac110005.json
03:02:35 INFO pupa: save bill H3875 in 190th as bill_b98fcff4-a0fe-11e7-aa77-0242ac110005.json
03:02:39 INFO pupa: No vote found in supplement for vote #73
03:02:39 INFO pupa: No vote found in supplement for vote #74
03:02:39 INFO scrapelib: GET - http://malegislature.gov/RollCall/190/SenateRollCall57.pdf
03:02:39 INFO scrapelib: GET - http://malegislature.gov/RollCall/190/SenateRollCall58.pdf
03:02:40 INFO pupa: No vote found in supplement for vote #82
no pupa_settings on path, using defaults
ma (scrape, import)
  bills: {}
  people: {}
  committees: {}
  File "/opt/openstates/venv-pupa/src/pupa/pupa/cli/commands/update.py", line 173, in do_scrape
  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 67, 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)
Traceback (most recent call last):
    report[scraper_name] = scraper.do_scrape(**scrape_args)
  File "/opt/openstates/venv-pupa/src/pupa/pupa/scrape/base.py", line 99, in do_scrape
    for obj in self.scrape(**kwargs) or []:
  File "/opt/openstates/openstates/openstates/ma/bills.py", line 47, in scrape
    yield from self.scrape_chamber('lower', session)
  File "/opt/openstates/openstates/openstates/ma/bills.py", line 66, in scrape_chamber
    yield from self.scrape_bill(session, bill, chamber)
  File "/opt/openstates/openstates/openstates/ma/bills.py", line 160, in scrape_bill
    self.scrape_actions(bill, bill_url, session)
  File "/opt/openstates/openstates/openstates/ma/bills.py", line 198, in scrape_actions
    self.scrape_action_page(bill, page)
  File "/opt/openstates/openstates/openstates/ma/bills.py", line 223, in scrape_action_page
    y = int(action_name.strip().split('-')[1].split('YEAS')[0])
ValueError: invalid literal for int() with base 10: '2000 passed over veto '
```

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



Discussion:

Resolving patch:
diff --git a/openstates/ma/bills.py b/openstates/ma/bills.py
--- a/openstates/ma/bills.py
+++ b/openstates/ma/bills.py
@@ -220,7 +220,7 @@ def scrape_action_page(self, bill, page):
             if "Supplement" in action_name:
                 actor = "lower"
                 vote_action = action_name.split(' -')[0]
-                y = int(action_name.strip().split('-')[1].split('YEAS')[0])
+                y = int(action_name.strip().split(' -')[1].split('YEAS')[0])
                 n = int(action_name.strip().split('YEAS to')[1].split('NAYS')[0])
 
                 # get supplement number


Test patch: