Repository: openstates/openstates-scrapers

Issue:
NH failing since at least 2017-11-16
NH has been failing since 2017-11-16

Based on automated runs it appears that NH has not run successfully in 2 days (2017-11-16).


```
  23:17:39 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "Yvonne Thomas"}
23:17:39 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "David Lundgren"}
23:17:39 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "Neal Kurk"}
23:17:40 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "Timothy Smith"}
23:17:40 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "Thomas Buco"}
23:17:40 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "Sandra Keans"}
23:17:40 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "Jane Beaulieu"}
23:17:40 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "David Huot"}
23:17:40 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "Franklin Tilton"}
23:17:40 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "Kermit Williams"}
23:17:40 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "Jacqueline Cali-Pitts"}
23:17:40 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "Michael McCarthy"}
23:17:40 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "Martin Jack"}
23:17:40 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "Martha Hennessey"}
23:17:40 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "Harold French"}
23:17:40 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "Frank Sapareto"}
23:17:40 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "Gary Daniels"}
23:17:40 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "Suzanne Smith"}
  people: {}
nh (scrape, import)
  committees: {}
no pupa_settings on path, using defaults
  bills: {}
import jurisdictions...
import organizations...
import people...
import posts...
import memberships...
    subcommands[args.subcommand].handle(args, other)
  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
Traceback (most recent call last):
  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 307, in do_handle
    report['import'] = self.do_import(juris, args)
  File "/opt/openstates/venv-pupa/src/pupa/pupa/cli/commands/update.py", line 211, in do_import
    report.update(membership_importer.import_directory(datadir))
  File "/opt/openstates/venv-pupa/src/pupa/pupa/importers/base.py", line 190, in import_directory
    return self.import_data(json_stream())
  File "/opt/openstates/venv-pupa/src/pupa/pupa/importers/base.py", line 227, in import_data
    obj_id, what = self.import_item(data)
  File "/opt/openstates/venv-pupa/src/pupa/pupa/importers/base.py", line 247, in import_item
    data = self.prepare_for_db(data)
  File "/opt/openstates/venv-pupa/src/pupa/pupa/importers/memberships.py", line 50, in prepare_for_db
    data['post_id'] = self.post_importer.resolve_json_id(data['post_id'])
  File "/opt/openstates/venv-pupa/src/pupa/pupa/importers/base.py", line 165, in resolve_json_id
    raise UnresolvedIdError(errmsg)
pupa.exceptions.UnresolvedIdError: cannot resolve pseudo id to Post: ~{"label": "13", "organization__classification": "lower"}
```

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



Discussion:
The problem here is with Casey Conley, who is getting a post_id label of "13", should be "Strafford 13".  See scrape source document http://www.gencourt.state.nh.us/house/members/member.aspx.

I've pinged Scott Kelley at the State House about it and am awaiting reply.  (I live in NH.)

Resolving patch:
diff --git a/openstates/nh/people.py b/openstates/nh/people.py
--- a/openstates/nh/people.py
+++ b/openstates/nh/people.py
@@ -59,6 +59,13 @@ def _parse_person(self, row, chamber, seat_map):
         if district == 'Rockingham 0' and last_name == 'Lerner':
             district = 'Rockingham 4'
 
+        # Temporary fix for Casey Conley
+        if last_name == 'Conley':
+            if district == '13':
+                district = 'Strafford 13'
+            elif district == 'Strafford 13':
+                self.info('"Temporary fix for Casey Conley" can be removed')
+
         person = Person(primary_org=chamber,
                         district=district,
                         name=full_name,


Test patch: