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
data_us_census = ds.us_census.us_census()
Traceback (most recent call last):
File "C:\Users\juanc\Anaconda3\envs\coronawhy\lib\site-packages\IPython\core\interactiveshell.py", line 3331, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
data_us_census = ds.us_census.us_census()
File "c:\users\juanc\desktop\01 juan calvo\01 big data\01 proyectos\covid-19\code\repositories\task-geo\task_geo\data_sources\demographics\us_census\us_census.py", line 31, in us_census
df = us_census_connector()
File "c:\users\juanc\desktop\01 juan calvo\01 big data\01 proyectos\covid-19\code\repositories\task-geo\task_geo\data_sources\demographics\us_census\us_census.py", line 47, in us_census_connector
urllib.request.urlretrieve(url, "uscensus.zip")
File "C:\Users\juanc\Anaconda3\envs\coronawhy\lib\urllib\request.py", line 247, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File "C:\Users\juanc\Anaconda3\envs\coronawhy\lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\juanc\Anaconda3\envs\coronawhy\lib\urllib\request.py", line 531, in open
response = meth(req, response)
File "C:\Users\juanc\Anaconda3\envs\coronawhy\lib\urllib\request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Users\juanc\Anaconda3\envs\coronawhy\lib\urllib\request.py", line 569, in error
return self._call_chain(*args)
File "C:\Users\juanc\Anaconda3\envs\coronawhy\lib\urllib\request.py", line 503, in _call_chain
result = func(*args)
File "C:\Users\juanc\Anaconda3\envs\coronawhy\lib\urllib\request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 500: Internal Server Error
The text was updated successfully, but these errors were encountered:
What is causing the problem is that the dataset URL was obtained getting the link address for the downloaded file in the web browser. This URL has the following form:
The problem is that this TOKEN is changed in each download, making it useless when trying to download the file multiple times. We need to find a URL using the API directly.
Commit SHA:
commit c4af4d7 (HEAD -> master, origin/master, origin/HEAD)
Merge: f23824d 3de7d90
Author: Manuel Alvarez Campo [email protected]
Date: Sat Apr 4 13:48:16 2020 +0200
Merge pull request Adding metadata for all country data CDS #35 from shaikh-raj/master
Adding metadata for CDS datasource
Python version: 3.7
Operating System: Windows
Trello card: https://trello.com/c/AtA819Yd
Description
I got the error 500 when calling us_census()
Error
The text was updated successfully, but these errors were encountered: