Repository: openstates/openstates-scrapers

Issue:
MI failing since at least 2018-05-12
MI has been failing since 2018-05-12

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


```
  02:47:18 INFO scrapelib: GET - http://legislature.mi.gov/doc.aspx?2018-HJR-GG
02:47:19 INFO pupa: save bill HJR GG in 2017-2018 as bill_dcf34e60-5681-11e8-a8aa-029b97b45e2a.json
02:47:19 INFO scrapelib: GET - http://legislature.mi.gov/doc.aspx?2017-HJR-HH
02:47:20 INFO scrapelib: GET - http://legislature.mi.gov/doc.aspx?2018-HJR-HH
02:47:21 INFO pupa: save bill HJR HH in 2017-2018 as bill_de254248-5681-11e8-a8aa-029b97b45e2a.json
02:47:21 INFO scrapelib: GET - http://legislature.mi.gov/doc.aspx?2017-HJR-II
02:47:22 INFO scrapelib: GET - http://legislature.mi.gov/doc.aspx?2018-HJR-II
02:47:23 INFO pupa: save bill HJR II in 2017-2018 as bill_df57e738-5681-11e8-a8aa-029b97b45e2a.json
02:47:23 INFO scrapelib: GET - http://legislature.mi.gov/doc.aspx?2017-HJR-JJ
02:47:24 INFO scrapelib: GET - http://legislature.mi.gov/doc.aspx?2018-HJR-JJ
02:47:25 WARNING pupa: Cannot open bill page for HJR JJ; skipping
02:47:25 INFO scrapelib: GET - http://www.senate.michigan.gov/senatorinfo_list.html
02:47:25 INFO scrapelib: HEAD - http://www.senate.michigan.gov/_images/Booher.png
02:47:26 INFO scrapelib: GET - http://www.SenatorDarwinBooher.com/contact/
02:47:27 INFO pupa: save person Booher, Darwin L as person_e21c0558-5681-11e8-a8aa-029b97b45e2a.json
loaded Open States pupa settings...
mi (scrape, import)
  bills: {}
  people: {}
  committees: {}
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 116, in do_scrape
    self.save_object(obj)
  File "/opt/openstates/venv-pupa/src/pupa/pupa/scrape/base.py", line 99, in save_object
    raise ve
  File "/opt/openstates/venv-pupa/src/pupa/pupa/scrape/base.py", line 96, in save_object
    obj.validate()
  File "/opt/openstates/venv-pupa/src/pupa/pupa/scrape/base.py", line 191, in validate
    self.__class__.__name__, self._id, '\n\t'+'\n\t'.join(errors)
pupa.exceptions.ScrapeValueError: validation of Person e21c0558-5681-11e8-a8aa-029b97b45e2a failed: 
	'/booher' is not a 'uri'
Failed validating 'format' in schema['properties']['links']['items']['properties']['url']:
    {'format': 'uri', 'type': 'string'}
On instance['links'][0]['url']:
    '/booher'
	'/booher' is not a 'uri'
Failed validating 'format' in schema['properties']['sources']['items']['properties']['url']:
    {'format': 'uri', 'type': 'string'}
On instance['sources'][0]['url']:
    '/booher'
```

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



Discussion:

Resolving patch:
diff --git a/openstates/mi/people.py b/openstates/mi/people.py
--- a/openstates/mi/people.py
+++ b/openstates/mi/people.py
@@ -87,6 +87,7 @@ def scrape_upper(self, chamber):
         url_to_append = 'http://www.senate.michigan.gov/_images/'
         data = self.get(url).text
         doc = lxml.html.fromstring(data)
+        doc.make_links_absolute(url)
         for row in doc.xpath('//table[not(@class="calendar")]//tr')[3:]:
             if len(row) != 7:
                 continue


Test patch: