-
Notifications
You must be signed in to change notification settings - Fork 146
Open
Description
The following works
tables = c.acs5.tables(year=2020)
fields = c.acs5.fields(year=2020)The following raises a json decode error from a 404 response
fields = c.acs5.fields(year=2020)This is because ACSClient.tables calls _switch_endpoints which mutates the state of the client. which ACSClient.fields does not. The simplest hotfix is to add the following code to ACSClient
def fields(self, *args, **kwargs):
self._switch_endpoints(kwargs.get("year", self.default_year))
return super(ACSClient, self).fields(*args, **kwargs)But I highly suggest removing the mutable state from ACSClient.
Metadata
Metadata
Assignees
Labels
No labels