Repository: openstates/openstates-scrapers

Issue:
MD failing since at least 2018-04-01
MD has been failing since 2018-04-01

Based on automated runs it appears that MD has not run successfully in 7 days (2018-04-01).


```
  23:46:47 INFO scrapelib: GET - http://mgaleg.maryland.gov/webmga/frmMain.aspx?id=SB636&stab=01&pid=billpage&tab=subject3&ys=2018rs
23:46:48 INFO scrapelib: GET - http://mgaleg.maryland.gov/webmga/frmMain.aspx?id=SB636&stab=02&pid=billpage&tab=subject3&ys=2018rs
23:46:49 INFO scrapelib: GET - http://mgaleg.maryland.gov/webmga/frmMain.aspx?id=SB636&stab=03&pid=billpage&tab=subject3&ys=2018rs
23:46:50 INFO scrapelib: GET - http://mgaleg.maryland.gov/2018RS/votes/Senate/0618.pdf
23:46:51 INFO pupa: save vote_event 2018 - 2018-03-19 - On Third Reading as vote_event_aff80e0c-3a1e-11e8-80f8-0225efd9e40c.json
23:46:51 INFO pupa: save bill SB636 in 2018 as bill_ae2b3158-3a1e-11e8-80f8-0225efd9e40c.json
23:46:51 INFO scrapelib: GET - http://mgaleg.maryland.gov/webmga/frmMain.aspx?id=SB637&stab=01&pid=billpage&tab=subject3&ys=2018rs
23:46:52 INFO scrapelib: GET - http://mgaleg.maryland.gov/webmga/frmMain.aspx?id=SB637&stab=02&pid=billpage&tab=subject3&ys=2018rs
23:46:53 INFO scrapelib: GET - http://mgaleg.maryland.gov/webmga/frmMain.aspx?id=SB637&stab=03&pid=billpage&tab=subject3&ys=2018rs
23:46:54 INFO pupa: save bill SB637 in 2018 as bill_b08e6442-3a1e-11e8-80f8-0225efd9e40c.json
23:46:54 INFO scrapelib: GET - http://mgaleg.maryland.gov/webmga/frmMain.aspx?id=SB638&stab=01&pid=billpage&tab=subject3&ys=2018rs
23:46:55 INFO scrapelib: GET - http://mgaleg.maryland.gov/webmga/frmMain.aspx?id=SB638&stab=02&pid=billpage&tab=subject3&ys=2018rs
23:46:56 INFO scrapelib: GET - http://mgaleg.maryland.gov/webmga/frmMain.aspx?id=SB638&stab=03&pid=billpage&tab=subject3&ys=2018rs
23:46:57 INFO pupa: save bill SB638 in 2018 as bill_b257d8da-3a1e-11e8-80f8-0225efd9e40c.json
23:46:57 INFO scrapelib: GET - http://mgaleg.maryland.gov/webmga/frmMain.aspx?id=SB639&stab=01&pid=billpage&tab=subject3&ys=2018rs
23:46:58 INFO scrapelib: GET - http://mgaleg.maryland.gov/webmga/frmMain.aspx?id=SB639&stab=02&pid=billpage&tab=subject3&ys=2018rs
23:46:59 INFO scrapelib: GET - http://mgaleg.maryland.gov/webmga/frmMain.aspx?id=SB639&stab=03&pid=billpage&tab=subject3&ys=2018rs
23:47:00 INFO scrapelib: GET - http://mgaleg.maryland.gov/2018RS/votes/Senate/0619.pdf
23:47:01 INFO pupa: save vote_event 2018 - 2018-03-19 - On Third Reading as vote_event_b5ee5f00-3a1e-11e8-80f8-0225efd9e40c.json
23:47:01 INFO scrapelib: GET - http://mgaleg.maryland.gov/2018RS/votes/Senate/1145.pdf
23:47:02 ERROR pupa: Motion Extracted: Education - Public School Personnel - Disciplinary
loaded Open States pupa settings...
md (scrape, import)
  people: {}
  committees: {}
  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 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/md/bills.py", line 547, in scrape
    yield from self.scrape_chamber(chamber, session)
  File "/opt/openstates/openstates/openstates/md/bills.py", line 576, in scrape_chamber
    yield from self.scrape_bill(chamber, session, bill_id, url)
  File "/opt/openstates/openstates/openstates/md/bills.py", line 454, in scrape_bill
    yield from self.parse_bill_votes_new(doc, bill)
  File "/opt/openstates/openstates/openstates/md/bills.py", line 180, in parse_bill_votes_new
    vote = self.parse_vote_pdf(href, bill)
  File "/opt/openstates/openstates/openstates/md/bills.py", line 241, in parse_vote_pdf
    raise ValueError("No Motion or faulty Motion scraped.")
ValueError: No Motion or faulty Motion scraped.
```

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



Discussion:
Looking into it.

Resolving patch:
diff --git a/openstates/md/bills.py b/openstates/md/bills.py
--- a/openstates/md/bills.py
+++ b/openstates/md/bills.py
@@ -228,7 +228,8 @@ def parse_vote_pdf(self, vote_url, bill):
             consent_calendar_bills = re.split(r'\s{2,}', lines[page_index-1].strip())
             assert consent_calendar_bills, "Could not find bills for consent calendar vote"
 
-        motion_keywords = ['favorable', 'reading', 'amendment', 'motion', 'introduced']
+        motion_keywords = ['favorable', 'reading', 'amendment', 'motion', 'introduced',
+                           'bill pass']
         motion_lines = [3, 2, 4, 5]  # Relative LineNumbers to be checked for existence of motion
 
         for i in motion_lines:


Test patch:
diff --git a/test.txt b/test.txt
new file mode 100644
--- /dev/null
+++ b/test.txt
@@ -0,0 +1 @@
+Education - Public School Personnel - Disciplinary