Closed rickecon closed 2 years ago
Hi @rickecon,
I get the same as you.
Running the snippet of code, I got the DSD_demo_pjan not found
error (full output below).
The same error for demo_fasec:
Server Error 500: DSD_demo_fasec not found in the Eurostat server
(oguk-dev) C:\Users\jonat\repos\anotherPracticeRepo>python anotherEurostatTest.py
Server Error 500: DSD_demo_pjan not found in the Eurostat server
Traceback (most recent call last):
File "C:\Users\jonat\anaconda3\envs\oguk-dev\lib\site-packages\pandasdmx\model.py", line 791, in __call__
rc = getattr(self._reader.message, rc_name)
AttributeError: 'StructureMessage' object has no attribute 'datastructure'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "anotherEurostatTest.py", line 14, in <module>
verbose=True
File "C:\Users\jonat\anaconda3\envs\oguk-dev\lib\site-packages\eurostat\eurostat.py", line 304, in get_sdmx_data_df
d = get_sdmx_data(code, StartPeriod, EndPeriod, filter_pars, flags, verbose)
File "C:\Users\jonat\anaconda3\envs\oguk-dev\lib\site-packages\eurostat\_decorators.py", line 61, in wrapper
res = func(estat, *args, **kwargs)
File "C:\Users\jonat\anaconda3\envs\oguk-dev\lib\site-packages\eurostat\eurostat.py", line 269, in get_sdmx_data
resp = __pandasdmx_get_data(estat, code, key=dict(c), params={'startPeriod': str(StartPeriod), 'endPeriod': str(EndPeriod)})
File "C:\Users\jonat\anaconda3\envs\oguk-dev\lib\site-packages\eurostat\_decorators.py", line 19, in wrapper
resp = func(*args, **kwargs)
File "C:\Users\jonat\anaconda3\envs\oguk-dev\lib\site-packages\eurostat\eurostat.py", line 371, in __pandasdmx_get_data
resp = estat.data(code, key=key, params=params)
File "C:\Users\jonat\anaconda3\envs\oguk-dev\lib\site-packages\pandasdmx\api.py", line 309, in get
request=True, target_only=False)
File "C:\Users\jonat\anaconda3\envs\oguk-dev\lib\site-packages\pandasdmx\model.py", line 806, in __call__
agency=self.agency_id, **kwargs)
File "C:\Users\jonat\anaconda3\envs\oguk-dev\lib\site-packages\pandasdmx\api.py", line 363, in get
raise SDMXException('Server error:', status_code, url)
pandasdmx.api.SDMXException: ('Server error:', 500, 'http://ec.europa.eu/eurostat/SDMX/diss-web/rest/datastructure/ESTAT/DSD_demo_pjan/latest?references=all')
@jpycroft @nikhilwoodruff. It is working now. Must have been the EuroStat REST API was down. Closing this issue.
@jpycroft @nikhilwoodruff. I posted this issue in the Bitbucket repository for the eurostat package. I have been working on @jpycroft's
demographics.py
PR #36 (my branch is here, which I will submit as a PR to @jpycroft's PR branch as soon as mine is ready). I have made some updates to the data cleaning and imputation at the tails of the births data.These operations were working just fine as recently as last evening. But when I tried to download U.K. population and births data by age from EuroStat today using the Python
eurostat
package (v. 0.2.3), I got a persistent error todayServer Error 500: DSD_demo_pjan not found in the Eurostat server
. It looks like it could be an issue with thepandasdmx
package. Or it could be that the EuroStat REST API server is down. I would be interested to see if anyone else has the same problem. The code I executed that created this error is the following:As I said, this download method was working just fine as of last night. The error traceback is the following:
I also received the same error for U.K. births data by age I was downloading using the following code: