You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 1, 2020. It is now read-only.
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-1-2902c67eda5b> in <module>
34 c = Client()
----> 5 c.demographics(state=48)
6 df = c.fetch()
/anaconda3/lib/python3.7/site-packages/cmdc/client.py in __call__(self, state, **filters)
71raiseValueError(msg)
72
---> 73 filters["fips"] = self.client.fips_in_states(state)
7475# process filters
/anaconda3/lib/python3.7/site-packages/cmdc/client.py in fips_in_states(self, states)
204 states = [states]
205 states = [int(us.states.lookup(str(x).zfill(2)).fips) for x in states]
--> 206 fips = self.counties.query("state in @states")["fips"].unique()
207returnsorted(list(fips)) + states
208
/anaconda3/lib/python3.7/site-packages/cmdc/client.py in counties(self)
191 res =self.sess.get(BASE_URL+"/counties")
192ifnot res.ok:
--> 193 raise ValueError("Failed to get list of counties")
194195self._counties = pd.DataFrame(res.json())
ValueError: Failed to get list of counties
Problem Description
The following simple example from the client library raises an error with requests 2.23.0, pandas 1.0.3, us 2.0.2 and email_validator 1.1.1:
Traceback
Details
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-1-2902c67eda5b> in <module> 3 4 c = Client() ----> 5 c.demographics(state=48) 6 df = c.fetch() /anaconda3/lib/python3.7/site-packages/cmdc/client.py in __call__(self, state, **filters) 71 raise ValueError(msg) 72 ---> 73 filters["fips"] = self.client.fips_in_states(state) 74 75 # process filters /anaconda3/lib/python3.7/site-packages/cmdc/client.py in fips_in_states(self, states) 204 states = [states] 205 states = [int(us.states.lookup(str(x).zfill(2)).fips) for x in states] --> 206 fips = self.counties.query("state in @states")["fips"].unique() 207 return sorted(list(fips)) + states 208 /anaconda3/lib/python3.7/site-packages/cmdc/client.py in counties(self) 191 res = self.sess.get(BASE_URL + "/counties") 192 if not res.ok: --> 193 raise ValueError("Failed to get list of counties") 194 195 self._counties = pd.DataFrame(res.json()) ValueError: Failed to get list of counties