Repository: openstates/openstates-scrapers

Issue:
OK failing since at least 2017-07-29
OK has been failing since 2017-07-29

Based on automated runs it appears that OK has not run successfully in 2 days (2017-07-29).


```
  02:10:09 INFO pupa: save person Roger Thompson as person_1e8475c0-74f6-11e7-858b-0242ac110005.json
02:10:09 INFO pupa: save membership 1e8475c0-74f6-11e7-858b-0242ac110005 membership in ~{"classification": "upper"} as membership_1e84796c-74f6-11e7-858b-0242ac110005.json
02:10:09 INFO pupa: save membership 1e8475c0-74f6-11e7-858b-0242ac110005 membership in ~{"classification": "party", "name": "Republican"} as membership_1e847b92-74f6-11e7-858b-0242ac110005.json
02:10:09 INFO scrapelib: GET - http://oksenate.gov/Senators/biographies/treat_bio.html
02:10:10 INFO pupa: save person Greg Treat as person_1f1d4a98-74f6-11e7-858b-0242ac110005.json
02:10:10 INFO pupa: save membership 1f1d4a98-74f6-11e7-858b-0242ac110005 membership in ~{"classification": "upper"} as membership_1f1d4e58-74f6-11e7-858b-0242ac110005.json
02:10:10 INFO pupa: save membership 1f1d4a98-74f6-11e7-858b-0242ac110005 membership in ~{"classification": "party", "name": "Republican"} as membership_1f1d5074-74f6-11e7-858b-0242ac110005.json
02:10:10 INFO scrapelib: GET - http://oksenate.gov/Senators/biographies/yen_bio.html
02:10:11 INFO pupa: save membership 1fb7ab60-74f6-11e7-858b-0242ac110005 membership in ~{"classification": "upper"} as membership_1fb7b04c-74f6-11e7-858b-0242ac110005.json
02:10:11 INFO pupa: save person Ervin Yen as person_1fb7ab60-74f6-11e7-858b-0242ac110005.json
02:10:11 INFO pupa: save membership 1fb7ab60-74f6-11e7-858b-0242ac110005 membership in ~{"classification": "party", "name": "Republican"} as membership_1fb7b326-74f6-11e7-858b-0242ac110005.json
02:10:11 INFO pupa: GET via curl subprocess: https://www.okhouse.gov/Members/Default.aspx
02:10:12 INFO pupa: GET via curl subprocess: https://www.okhouse.gov/District.aspx?District=33
02:10:12 INFO pupa: save person Greg Babinec as person_2113c200-74f6-11e7-858b-0242ac110005.json
02:10:12 WARNING pupa: validation of Person 2113c200-74f6-11e7-858b-0242ac110005 failed: 1 validation errors:
Value None for field '<obj>.image' is not of type string
no pupa_settings on path, using defaults
ok (scrape, import)
  bills: {}
  people: {}
  committees: {}
Value None for field '<obj>.image' is not of type string
  File "/opt/openstates/venv-pupa/src/pupa/pupa/scrape/base.py", line 175, in validate
    validator.validate(self.as_dict(), schema)
  File "/opt/openstates/venv-pupa/lib/python3.5/site-packages/validictory/validator.py", line 620, in validate
    raise MultipleValidationError(self._errors)
validictory.validator.MultipleValidationError: 1 validation errors:
Traceback (most recent call last):
During handling of the above exception, another exception occurred:
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 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)
  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 104, in do_scrape
    self.save_object(obj)
  File "/opt/openstates/venv-pupa/src/pupa/pupa/scrape/base.py", line 89, in save_object
    raise ve
  File "/opt/openstates/venv-pupa/src/pupa/pupa/scrape/base.py", line 85, in save_object
    obj.validate()
  File "/opt/openstates/venv-pupa/src/pupa/pupa/scrape/base.py", line 178, in validate
    self.__class__.__name__, self._id, ve)
pupa.exceptions.ScrapeValueError: validation of Person 2113c200-74f6-11e7-858b-0242ac110005 failed: 1 validation errors:
Value None for field '<obj>.image' is not of type string
```

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



Discussion:

Resolving patch:
diff --git a/openstates/ok/people.py b/openstates/ok/people.py
--- a/openstates/ok/people.py
+++ b/openstates/ok/people.py
@@ -111,7 +111,7 @@ def scrape_lower_chamber(self, term):
 
             party = self._parties[party_text]
 
-            legislator_url = 'https://www.okhouse.gov/District.aspx?District=' + district
+            legislator_url = 'https://www.okhouse.gov/Members/District.aspx?District=' + district
             legislator_page = self.curl_lxmlize(legislator_url)
 
             photo_url = self.get_node(


Test patch: