We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
MS failing since at least 2017-12-31
MS has been failing since 2017-12-31

Based on automated runs it appears that MS has not run successfully in 7 days (2017-12-31).


```
  00:00:18 CRITICAL pupa: Session(s) 2018 Regular Session were reported by Mississippi.get_session_list() but were not found in Mississippi.legislative_sessions or Mississippi.ignored_scraped_sessions.
no pupa_settings on path, using defaults
ms (scrape, import)
  bills: {}
  committee: {}
  people: {}
```

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


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `openstates/ms/people.py`
Content:
```
1 import lxml.etree
2 
3 from pupa.scrape import Person, Scraper
4 
5 import scrapelib
6 import os.path
7 
8 
9 CAP_ADDRESS = """P. O. Box 1018
10 Jackson, MS 39215"""
11 
12 
13 class MSLegislatorScraper(Scraper):
14 
15     def scrape(self, chamber=None):
16         if chamber:
17             yield from self.scrape_legs(chamber)
18         else:
19             yield from self.scrape_legs('upper')
20             yield from self.scrape_legs('lower')
21 
22     def scrape_legs(self, chamber):
23         if chamber == 'upper':
24             url = 'http://billstatus.ls.state.ms.us/members/ss_membs.xml'
25             range_num = 5
26         else:
27             url = 'http://billstatus.ls.state.ms.us/members/hr_membs.xml'
28             range_num = 6
29 
30         leg_dir_page = self.get(url)
31         root = lxml.etree.fromstring(leg_dir_page.content)
32         for mr in root.xpath('//LEGISLATURE/MEMBER'):
33             for num in range(1, range_num):
34                 leg_path = "string(M%s_NAME)" % num
35                 leg_link_path = "string(M%s_LINK)" % num
36                 leg = mr.xpath(leg_path)
37                 leg_link = mr.xpath(leg_link_path)
38                 role = ""
39                 yield from self.scrape_details(chamber, leg, leg_link, role)
40 
41         # TODO: come back and do roles correctly at some point
42 
43         # if chamber == 'lower':
44             # chair_name = root.xpath('string(//CHAIR_NAME)')
45             # chair_link = root.xpath('string(//CHAIR_LINK)')
46             # role = root.xpath('string(//CHAIR_TITLE)')
47             # yield from self.scrape_details(chamber, chair_name, chair_link, role)
48         # else:
49             # Senate Chair is the Governor. Info has to be hard coded
50             # chair_name = root.xpath('string(//CHAIR_NAME)')
51             # role = root.xpath('string(//CHAIR_TITLE)')
52             # TODO: if we're going to hardcode the governor, do it better
53             # district = "Governor"
54             # leg = Legislator(term_name, chamber, district, chair_name,
55             #                 first_name="", last_name="", middle_name="",
56             #                 party="Republican", role=role)
57 
58         # disabling this since it creates duplicates right now
59         # protemp_name = root.xpath('string(//PROTEMP_NAME)')
60         # protemp_link = root.xpath('string(//PROTEMP_LINK)')
61         # role = root.xpath('string(//PROTEMP_TITLE)')
62         # yield from self.scrape_details(chamber, protemp_name, protemp_link, role)
63 
64     def scrape_details(self, chamber, leg_name, leg_link, role):
65         if not leg_link:
66             # Vacant post, likely:
67             if "Vacancy" in leg_name:
68                 return
69             raise Exception("leg_link is null. something went wrong")
70         try:
71             url = 'http://billstatus.ls.state.ms.us/members/%s' % leg_link
72             url_root = os.path.dirname(url)
73             details_page = self.get(url)
74             root = lxml.etree.fromstring(details_page.content)
75             party = root.xpath('string(//PARTY)')
76 
77             district = root.xpath('string(//DISTRICT)')
78 
79             photo = "%s/%s" % (url_root, root.xpath('string(//IMG_NAME)'))
80 
81             home_phone = root.xpath('string(//H_PHONE)')
82 
83             home_address = root.xpath('string(//H_ADDRESS)')
84             home_address2 = root.xpath('string(//H_ADDRESS2)')
85             home_city = root.xpath('string(//H_CITY)')
86             home_zip = root.xpath('string(//H_ZIP)')
87 
88             home_address_total = "%s\n%s\n%s\n%s" % (
89                 home_address,
90                 home_address2,
91                 home_city,
92                 home_zip
93             )
94 
95             # bis_phone = root.xpath('string(//B_PHONE)')
96             capital_phone = root.xpath('string(//CAP_PHONE)')
97             # other_phone = root.xpath('string(//OTH_PHONE)')
98             org_info = root.xpath('string(//ORG_INFO)')
99             email_name = root.xpath('string(//EMAIL_ADDRESS)').strip()
100             cap_room = root.xpath('string(//CAP_ROOM)')
101 
102             if leg_name in ('Lataisha Jackson', 'John G. Faulkner', 'Cheikh Taylor'):
103                 assert not party, ("Remove special-casing for this Democrat without a "
104                                    "listed party: {}").format(leg_name)
105                 party = 'Democratic'
106             elif leg_name in ('James W. Mathis',
107                               'John Glen Corley',
108                               'Missy McGee',
109                               'Kevin Ford'):
110                 assert not party, ("Remove special-casing for this Republican without"
111                                    " a listed party: {}").format(leg_name)
112                 party = 'Republican'
113             elif party == 'D':
114                 party = 'Democratic'
115             elif party == 'R':
116                 party = 'Republican'
117             else:
118                 raise AssertionError(
119                     "A member with no identifiable party was found: {}".format(leg_name))
120             leg = Person(primary_org=chamber,
121                          district=district,
122                          party=party,
123                          image=photo,
124                          name=leg_name,
125                          role=role
126                          )
127             leg.extras['org_info'] = org_info
128             leg.add_source(url)
129             leg.add_link(url)
130 
131             if email_name != "":
132                 if "@" in email_name:
133                     email = email_name
134                 else:
135                     email = '%s@%s.ms.gov' % (email_name,
136                                               {"upper": "senate", "lower": "house"}[chamber])
137                 leg.add_contact_detail(type='email', value=email, note='Capitol Office')
138 
139             if capital_phone != "":
140                 leg.add_contact_detail(type='voice', value=capital_phone, note='Capitol Office')
141 
142             if cap_room != "":
143                 address = "Room %s\n%s" % (cap_room, CAP_ADDRESS)
144             else:
145                 address = CAP_ADDRESS
146             leg.add_contact_detail(type='address', value=address, note='Capitol Office')
147 
148             if home_phone != "":
149                 leg.add_contact_detail(type='voice', value=home_phone, note='District Office')
150 
151             if home_address_total != "":
152                 leg.add_contact_detail(type='address',
153                                        value=home_address_total,
154                                        note='District Office')
155 
156             yield leg
157         except scrapelib.HTTPError as e:
158             self.warning(str(e))
159
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/openstates/ms/people.py b/openstates/ms/people.py
--- a/openstates/ms/people.py
+++ b/openstates/ms/people.py
@@ -99,14 +99,12 @@
             email_name = root.xpath('string(//EMAIL_ADDRESS)').strip()
             cap_room = root.xpath('string(//CAP_ROOM)')
 
-            if leg_name in ('Lataisha Jackson', 'John G. Faulkner', 'Cheikh Taylor'):
+            if leg_name in ('Lataisha Jackson', 'John G. Faulkner'):
                 assert not party, ("Remove special-casing for this Democrat without a "
                                    "listed party: {}").format(leg_name)
                 party = 'Democratic'
             elif leg_name in ('James W. Mathis',
-                              'John Glen Corley',
-                              'Missy McGee',
-                              'Kevin Ford'):
+                              'John Glen Corley'):
                 assert not party, ("Remove special-casing for this Republican without"
                                    " a listed party: {}").format(leg_name)
                 party = 'Republican'

{"golden_diff": "diff --git a/openstates/ms/people.py b/openstates/ms/people.py\n--- a/openstates/ms/people.py\n+++ b/openstates/ms/people.py\n@@ -99,14 +99,12 @@\n             email_name = root.xpath('string(//EMAIL_ADDRESS)').strip()\n             cap_room = root.xpath('string(//CAP_ROOM)')\n \n-            if leg_name in ('Lataisha Jackson', 'John G. Faulkner', 'Cheikh Taylor'):\n+            if leg_name in ('Lataisha Jackson', 'John G. Faulkner'):\n                 assert not party, (\"Remove special-casing for this Democrat without a \"\n                                    \"listed party: {}\").format(leg_name)\n                 party = 'Democratic'\n             elif leg_name in ('James W. Mathis',\n-                              'John Glen Corley',\n-                              'Missy McGee',\n-                              'Kevin Ford'):\n+                              'John Glen Corley'):\n                 assert not party, (\"Remove special-casing for this Republican without\"\n                                    \" a listed party: {}\").format(leg_name)\n                 party = 'Republican'\n", "issue": "MS failing since at least 2017-12-31\nMS has been failing since 2017-12-31\n\nBased on automated runs it appears that MS has not run successfully in 7 days (2017-12-31).\n\n\n```\n  00:00:18 CRITICAL pupa: Session(s) 2018 Regular Session were reported by Mississippi.get_session_list() but were not found in Mississippi.legislative_sessions or Mississippi.ignored_scraped_sessions.\nno pupa_settings on path, using defaults\nms (scrape, import)\n  bills: {}\n  committee: {}\n  people: {}\n```\n\nVisit http://bobsled.openstates.org for more info.\n\n", "before_files": [{"content": "import lxml.etree\n\nfrom pupa.scrape import Person, Scraper\n\nimport scrapelib\nimport os.path\n\n\nCAP_ADDRESS = \"\"\"P. O. Box 1018\nJackson, MS 39215\"\"\"\n\n\nclass MSLegislatorScraper(Scraper):\n\n    def scrape(self, chamber=None):\n        if chamber:\n            yield from self.scrape_legs(chamber)\n        else:\n            yield from self.scrape_legs('upper')\n            yield from self.scrape_legs('lower')\n\n    def scrape_legs(self, chamber):\n        if chamber == 'upper':\n            url = 'http://billstatus.ls.state.ms.us/members/ss_membs.xml'\n            range_num = 5\n        else:\n            url = 'http://billstatus.ls.state.ms.us/members/hr_membs.xml'\n            range_num = 6\n\n        leg_dir_page = self.get(url)\n        root = lxml.etree.fromstring(leg_dir_page.content)\n        for mr in root.xpath('//LEGISLATURE/MEMBER'):\n            for num in range(1, range_num):\n                leg_path = \"string(M%s_NAME)\" % num\n                leg_link_path = \"string(M%s_LINK)\" % num\n                leg = mr.xpath(leg_path)\n                leg_link = mr.xpath(leg_link_path)\n                role = \"\"\n                yield from self.scrape_details(chamber, leg, leg_link, role)\n\n        # TODO: come back and do roles correctly at some point\n\n        # if chamber == 'lower':\n            # chair_name = root.xpath('string(//CHAIR_NAME)')\n            # chair_link = root.xpath('string(//CHAIR_LINK)')\n            # role = root.xpath('string(//CHAIR_TITLE)')\n            # yield from self.scrape_details(chamber, chair_name, chair_link, role)\n        # else:\n            # Senate Chair is the Governor. Info has to be hard coded\n            # chair_name = root.xpath('string(//CHAIR_NAME)')\n            # role = root.xpath('string(//CHAIR_TITLE)')\n            # TODO: if we're going to hardcode the governor, do it better\n            # district = \"Governor\"\n            # leg = Legislator(term_name, chamber, district, chair_name,\n            #                 first_name=\"\", last_name=\"\", middle_name=\"\",\n            #                 party=\"Republican\", role=role)\n\n        # disabling this since it creates duplicates right now\n        # protemp_name = root.xpath('string(//PROTEMP_NAME)')\n        # protemp_link = root.xpath('string(//PROTEMP_LINK)')\n        # role = root.xpath('string(//PROTEMP_TITLE)')\n        # yield from self.scrape_details(chamber, protemp_name, protemp_link, role)\n\n    def scrape_details(self, chamber, leg_name, leg_link, role):\n        if not leg_link:\n            # Vacant post, likely:\n            if \"Vacancy\" in leg_name:\n                return\n            raise Exception(\"leg_link is null. something went wrong\")\n        try:\n            url = 'http://billstatus.ls.state.ms.us/members/%s' % leg_link\n            url_root = os.path.dirname(url)\n            details_page = self.get(url)\n            root = lxml.etree.fromstring(details_page.content)\n            party = root.xpath('string(//PARTY)')\n\n            district = root.xpath('string(//DISTRICT)')\n\n            photo = \"%s/%s\" % (url_root, root.xpath('string(//IMG_NAME)'))\n\n            home_phone = root.xpath('string(//H_PHONE)')\n\n            home_address = root.xpath('string(//H_ADDRESS)')\n            home_address2 = root.xpath('string(//H_ADDRESS2)')\n            home_city = root.xpath('string(//H_CITY)')\n            home_zip = root.xpath('string(//H_ZIP)')\n\n            home_address_total = \"%s\\n%s\\n%s\\n%s\" % (\n                home_address,\n                home_address2,\n                home_city,\n                home_zip\n            )\n\n            # bis_phone = root.xpath('string(//B_PHONE)')\n            capital_phone = root.xpath('string(//CAP_PHONE)')\n            # other_phone = root.xpath('string(//OTH_PHONE)')\n            org_info = root.xpath('string(//ORG_INFO)')\n            email_name = root.xpath('string(//EMAIL_ADDRESS)').strip()\n            cap_room = root.xpath('string(//CAP_ROOM)')\n\n            if leg_name in ('Lataisha Jackson', 'John G. Faulkner', 'Cheikh Taylor'):\n                assert not party, (\"Remove special-casing for this Democrat without a \"\n                                   \"listed party: {}\").format(leg_name)\n                party = 'Democratic'\n            elif leg_name in ('James W. Mathis',\n                              'John Glen Corley',\n                              'Missy McGee',\n                              'Kevin Ford'):\n                assert not party, (\"Remove special-casing for this Republican without\"\n                                   \" a listed party: {}\").format(leg_name)\n                party = 'Republican'\n            elif party == 'D':\n                party = 'Democratic'\n            elif party == 'R':\n                party = 'Republican'\n            else:\n                raise AssertionError(\n                    \"A member with no identifiable party was found: {}\".format(leg_name))\n            leg = Person(primary_org=chamber,\n                         district=district,\n                         party=party,\n                         image=photo,\n                         name=leg_name,\n                         role=role\n                         )\n            leg.extras['org_info'] = org_info\n            leg.add_source(url)\n            leg.add_link(url)\n\n            if email_name != \"\":\n                if \"@\" in email_name:\n                    email = email_name\n                else:\n                    email = '%s@%s.ms.gov' % (email_name,\n                                              {\"upper\": \"senate\", \"lower\": \"house\"}[chamber])\n                leg.add_contact_detail(type='email', value=email, note='Capitol Office')\n\n            if capital_phone != \"\":\n                leg.add_contact_detail(type='voice', value=capital_phone, note='Capitol Office')\n\n            if cap_room != \"\":\n                address = \"Room %s\\n%s\" % (cap_room, CAP_ADDRESS)\n            else:\n                address = CAP_ADDRESS\n            leg.add_contact_detail(type='address', value=address, note='Capitol Office')\n\n            if home_phone != \"\":\n                leg.add_contact_detail(type='voice', value=home_phone, note='District Office')\n\n            if home_address_total != \"\":\n                leg.add_contact_detail(type='address',\n                                       value=home_address_total,\n                                       note='District Office')\n\n            yield leg\n        except scrapelib.HTTPError as e:\n            self.warning(str(e))\n", "path": "openstates/ms/people.py"}], "after_files": [{"content": "import lxml.etree\n\nfrom pupa.scrape import Person, Scraper\n\nimport scrapelib\nimport os.path\n\n\nCAP_ADDRESS = \"\"\"P. O. Box 1018\nJackson, MS 39215\"\"\"\n\n\nclass MSLegislatorScraper(Scraper):\n\n    def scrape(self, chamber=None):\n        if chamber:\n            yield from self.scrape_legs(chamber)\n        else:\n            yield from self.scrape_legs('upper')\n            yield from self.scrape_legs('lower')\n\n    def scrape_legs(self, chamber):\n        if chamber == 'upper':\n            url = 'http://billstatus.ls.state.ms.us/members/ss_membs.xml'\n            range_num = 5\n        else:\n            url = 'http://billstatus.ls.state.ms.us/members/hr_membs.xml'\n            range_num = 6\n\n        leg_dir_page = self.get(url)\n        root = lxml.etree.fromstring(leg_dir_page.content)\n        for mr in root.xpath('//LEGISLATURE/MEMBER'):\n            for num in range(1, range_num):\n                leg_path = \"string(M%s_NAME)\" % num\n                leg_link_path = \"string(M%s_LINK)\" % num\n                leg = mr.xpath(leg_path)\n                leg_link = mr.xpath(leg_link_path)\n                role = \"\"\n                yield from self.scrape_details(chamber, leg, leg_link, role)\n\n        # TODO: come back and do roles correctly at some point\n\n        # if chamber == 'lower':\n            # chair_name = root.xpath('string(//CHAIR_NAME)')\n            # chair_link = root.xpath('string(//CHAIR_LINK)')\n            # role = root.xpath('string(//CHAIR_TITLE)')\n            # yield from self.scrape_details(chamber, chair_name, chair_link, role)\n        # else:\n            # Senate Chair is the Governor. Info has to be hard coded\n            # chair_name = root.xpath('string(//CHAIR_NAME)')\n            # role = root.xpath('string(//CHAIR_TITLE)')\n            # TODO: if we're going to hardcode the governor, do it better\n            # district = \"Governor\"\n            # leg = Legislator(term_name, chamber, district, chair_name,\n            #                 first_name=\"\", last_name=\"\", middle_name=\"\",\n            #                 party=\"Republican\", role=role)\n\n        # disabling this since it creates duplicates right now\n        # protemp_name = root.xpath('string(//PROTEMP_NAME)')\n        # protemp_link = root.xpath('string(//PROTEMP_LINK)')\n        # role = root.xpath('string(//PROTEMP_TITLE)')\n        # yield from self.scrape_details(chamber, protemp_name, protemp_link, role)\n\n    def scrape_details(self, chamber, leg_name, leg_link, role):\n        if not leg_link:\n            # Vacant post, likely:\n            if \"Vacancy\" in leg_name:\n                return\n            raise Exception(\"leg_link is null. something went wrong\")\n        try:\n            url = 'http://billstatus.ls.state.ms.us/members/%s' % leg_link\n            url_root = os.path.dirname(url)\n            details_page = self.get(url)\n            root = lxml.etree.fromstring(details_page.content)\n            party = root.xpath('string(//PARTY)')\n\n            district = root.xpath('string(//DISTRICT)')\n\n            photo = \"%s/%s\" % (url_root, root.xpath('string(//IMG_NAME)'))\n\n            home_phone = root.xpath('string(//H_PHONE)')\n\n            home_address = root.xpath('string(//H_ADDRESS)')\n            home_address2 = root.xpath('string(//H_ADDRESS2)')\n            home_city = root.xpath('string(//H_CITY)')\n            home_zip = root.xpath('string(//H_ZIP)')\n\n            home_address_total = \"%s\\n%s\\n%s\\n%s\" % (\n                home_address,\n                home_address2,\n                home_city,\n                home_zip\n            )\n\n            # bis_phone = root.xpath('string(//B_PHONE)')\n            capital_phone = root.xpath('string(//CAP_PHONE)')\n            # other_phone = root.xpath('string(//OTH_PHONE)')\n            org_info = root.xpath('string(//ORG_INFO)')\n            email_name = root.xpath('string(//EMAIL_ADDRESS)').strip()\n            cap_room = root.xpath('string(//CAP_ROOM)')\n\n            if leg_name in ('Lataisha Jackson', 'John G. Faulkner'):\n                assert not party, (\"Remove special-casing for this Democrat without a \"\n                                   \"listed party: {}\").format(leg_name)\n                party = 'Democratic'\n            elif leg_name in ('James W. Mathis',\n                              'John Glen Corley'):\n                assert not party, (\"Remove special-casing for this Republican without\"\n                                   \" a listed party: {}\").format(leg_name)\n                party = 'Republican'\n            elif party == 'D':\n                party = 'Democratic'\n            elif party == 'R':\n                party = 'Republican'\n            else:\n                raise AssertionError(\n                    \"A member with no identifiable party was found: {}\".format(leg_name))\n            leg = Person(primary_org=chamber,\n                         district=district,\n                         party=party,\n                         image=photo,\n                         name=leg_name,\n                         role=role\n                         )\n            leg.extras['org_info'] = org_info\n            leg.add_source(url)\n            leg.add_link(url)\n\n            if email_name != \"\":\n                if \"@\" in email_name:\n                    email = email_name\n                else:\n                    email = '%s@%s.ms.gov' % (email_name,\n                                              {\"upper\": \"senate\", \"lower\": \"house\"}[chamber])\n                leg.add_contact_detail(type='email', value=email, note='Capitol Office')\n\n            if capital_phone != \"\":\n                leg.add_contact_detail(type='voice', value=capital_phone, note='Capitol Office')\n\n            if cap_room != \"\":\n                address = \"Room %s\\n%s\" % (cap_room, CAP_ADDRESS)\n            else:\n                address = CAP_ADDRESS\n            leg.add_contact_detail(type='address', value=address, note='Capitol Office')\n\n            if home_phone != \"\":\n                leg.add_contact_detail(type='voice', value=home_phone, note='District Office')\n\n            if home_address_total != \"\":\n                leg.add_contact_detail(type='address',\n                                       value=home_address_total,\n                                       note='District Office')\n\n            yield leg\n        except scrapelib.HTTPError as e:\n            self.warning(str(e))\n", "path": "openstates/ms/people.py"}]}