Repository: openstates/openstates-scrapers

Issue:
VT failing since at least 2017-12-02
VT has been failing since 2017-12-02

Based on automated runs it appears that VT has not run successfully in 2 days (2017-12-02).


```
  00:02:03 INFO scrapelib: GET - http://legislature.vermont.gov/bill/status/2018/S.C.R.13
00:02:06 INFO scrapelib: GET - http://legislature.vermont.gov/bill/loadBillDetailedStatus/2018/1388
00:02:06 INFO scrapelib: GET - http://legislature.vermont.gov/bill/loadBillRollCalls/2018/1388
00:02:07 INFO pupa: save bill S.C.R.13 in 2017-2018 as bill_7bf9480a-d7ef-11e7-8049-0242ac110003.json
00:02:07 INFO scrapelib: GET - http://legislature.vermont.gov/bill/status/2018/S.C.R.14
00:02:10 INFO scrapelib: GET - http://legislature.vermont.gov/bill/loadBillDetailedStatus/2018/1435
00:02:10 INFO scrapelib: GET - http://legislature.vermont.gov/bill/loadBillRollCalls/2018/1435
00:02:11 INFO pupa: save bill S.C.R.14 in 2017-2018 as bill_7e45aab8-d7ef-11e7-8049-0242ac110003.json
00:02:11 INFO scrapelib: GET - http://legislature.vermont.gov/bill/status/2018/S.C.R.15
00:02:13 INFO scrapelib: GET - http://legislature.vermont.gov/bill/loadBillDetailedStatus/2018/1427
00:02:14 INFO scrapelib: GET - http://legislature.vermont.gov/bill/loadBillRollCalls/2018/1427
00:02:15 INFO pupa: save bill S.C.R.15 in 2017-2018 as bill_8098e870-d7ef-11e7-8049-0242ac110003.json
00:02:15 INFO scrapelib: GET - http://legislature.vermont.gov/bill/status/2018/S.C.R.16
00:02:17 INFO scrapelib: GET - http://legislature.vermont.gov/bill/loadBillDetailedStatus/2018/1458
00:02:17 INFO scrapelib: GET - http://legislature.vermont.gov/bill/loadBillRollCalls/2018/1458
00:02:18 INFO pupa: save bill S.C.R.16 in 2017-2018 as bill_82e76e62-d7ef-11e7-8049-0242ac110003.json
00:02:18 INFO scrapelib: GET - http://legislature.vermont.gov/bill/status/2018/S.C.R.17
00:02:21 INFO scrapelib: GET - http://legislature.vermont.gov/bill/loadBillDetailedStatus/2018/1459
00:02:21 INFO scrapelib: GET - http://legislature.vermont.gov/bill/loadBillRollCalls/2018/1459
00:02:22 INFO pupa: save bill S.C.R.17 in 2017-2018 as bill_8532428c-d7ef-11e7-8049-0242ac110003.json
00:02:22 INFO scrapelib: GET - http://legislature.vermont.gov/bill/status/2018/S.C.R.18
00:02:24 INFO scrapelib: GET - http://legislature.vermont.gov/bill/loadBillDetailedStatus/2018/1473
00:02:24 INFO scrapelib: GET - http://legislature.vermont.gov/bill/loadBillRollCalls/2018/1473
00:02:25 INFO pupa: save bill S.C.R.18 in 2017-2018 as bill_872c1a4a-d7ef-11e7-8049-0242ac110003.json
no pupa_settings on path, using defaults
vt (scrape, import)
  people: {}
  committees: {}
  bills: {}
import jurisdictions...
import organizations...
import people...
  File "/opt/openstates/venv-pupa/src/pupa/pupa/cli/commands/update.py", line 260, in handle
  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)
Traceback (most recent call last):
    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 207, in do_import
    report.update(person_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 226, in import_data
    for json_id, data in self._prepare_imports(data_items):
  File "/opt/openstates/venv-pupa/src/pupa/pupa/importers/people.py", line 33, in _prepare_imports
    raise SameNameError(name)
pupa.exceptions.SameNameError: multiple people with same name "Christopher Mattos" in Jurisdiction - must provide birth_date to disambiguate
```

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



Discussion:
Mattos was [appointed in September](https://vtdigger.org/2017/09/01/scott-appoints-mattos-open-seat-legislature/).  The [state API](http://legislature.vermont.gov/people/loadAll/2018) returns two records for him, with different `PersonID` fields: 29034 and 29153.  The second record is more complete.  The PersonID field doesn't appear to be used by OS for correlation (e.g., for roll calls, committee assignments, etc).

Resolving patch:
diff --git a/openstates/vt/people.py b/openstates/vt/people.py
--- a/openstates/vt/people.py
+++ b/openstates/vt/people.py
@@ -24,6 +24,11 @@ def scrape(self, session=None):
             # Strip whitespace from strings
             info = {k: v.strip() for k, v in info.items()}
 
+            # Skip duplicate record for Christopher Mattos (appointed Rep September 2017)
+            if info['PersonID'] == "29034":
+                self.info("skipping first Christopher Mattos record")
+                continue
+
             # Gather photo URL from the member's page
             member_url = ('http://legislature.vermont.gov/people/single/{}/{}'.
                           format(year_slug, info['PersonID']))


Test patch: