Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An internal error occurred processing your request Reason: cannot import name 'make_traceback' #28

Closed
samburu opened this issue Nov 2, 2020 · 3 comments

Comments

@samburu
Copy link

samburu commented Nov 2, 2020

The code I'm using

import cdsapi
c = cdsapi.Client()
c.retrieve('cems-glofas-historical',{'format': 'zip','variable': 'Upstream area',},'download.zip')

Traceback

020-11-02 07:13:18,908 INFO Welcome to the CDS
2020-11-02 07:13:18,908 INFO Sending request to https://cds.climate.copernicus.eu/api/v2/resources/cems-glofas-historical
2020-11-02 07:13:19,726 INFO Request is queued
2020-11-02 07:13:20,914 INFO Request is failed
2020-11-02 07:13:20,914 ERROR Message: an internal error occurred processing your request
2020-11-02 07:13:20,914 ERROR Reason:  cannot import name 'make_traceback'
2020-11-02 07:13:20,914 ERROR   Traceback (most recent call last):
2020-11-02 07:13:20,914 ERROR     File "/opt/cds/adaptor/cdshandlers/adaptorlib/adaptorrequesthandler.py", line 66, in handle_request
2020-11-02 07:13:20,914 ERROR       return super().handle_request(cdsinf, data_request, self.config)
2020-11-02 07:13:20,915 ERROR     File "/opt/cds/cdsinf/python/lib/cdsinf/runner/requesthandler.py", line 113, in handle_request
2020-11-02 07:13:20,915 ERROR       return handler(cdsinf, request, config)
2020-11-02 07:13:20,915 ERROR     File "/opt/cds/adaptor/cdshandlers/url/handler.py", line 39, in handle_retrieve
2020-11-02 07:13:20,915 ERROR       dis = self._fetch_list(data_request["specific"])
2020-11-02 07:13:20,915 ERROR     File "/opt/cds/adaptor/cdshandlers/url/handler.py", line 91, in _fetch_list
2020-11-02 07:13:20,915 ERROR       pattern, valid_request, max_errors, patternmatchon, filename)
2020-11-02 07:13:20,915 ERROR     File "/opt/cds/adaptor/cdshandlers/adaptorlib/tools.py", line 141, in substitute
2020-11-02 07:13:20,916 ERROR       processed = template.render(r)
2020-11-02 07:13:20,916 ERROR     File "/usr/local/lib/python3.6/site-packages/jinja2/asyncsupport.py", line 76, in render
2020-11-02 07:13:20,916 ERROR     File "/usr/local/lib/python3.6/site-packages/jinja2/environment.py", line 1008, in render
2020-11-02 07:13:20,916 ERROR       block_start_string,
2020-11-02 07:13:20,916 ERROR     File "/usr/local/lib/python3.6/site-packages/jinja2/environment.py", line 773, in handle_exception
2020-11-02 07:13:20,916 ERROR       except TemplateSyntaxError as e:
2020-11-02 07:13:20,916 ERROR   ImportError: cannot import name 'make_traceback'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/lib/python3.7/site-packages/cdsapi/api.py", line 317, in retrieve
    result = self._api('%s/resources/%s' % (self.url, name), request, 'POST')
  File "/opt/conda/lib/python3.7/site-packages/cdsapi/api.py", line 458, in _api
    raise Exception("%s. %s." % (reply['error'].get('message'), reply['error'].get('reason')))
@EddyCMWF
Copy link
Collaborator

Hi @samburu ,
As far as I can tell you are requesting data that is not available via the CDS. I think you will find the data you are after here:
https://confluence.ecmwf.int/display/CEMS/Auxiliary+Data
Thanks,
Eddy

@LuisHernandoG
Copy link

Hi Eddy / Guys

I'm new in the community, .... would appreciate your support

I want to download daily precipitation data but got the below error, seems the parameter for the module "Project" shall be different than TBD (Note: I run the "test" to retrieve ERA5 data and it works well ....)

luis_h@LAPTOP-3D44S1T1:~$ python3 script.py
Traceback (most recent call last):
File "/home/luis_h/script.py", line 12, in
"project": TBD,
NameError: name 'TBD' is not defined

Below the script content ( taken from the C3S guide "Daily statistics calculated from ERA5 data" )

import cdsapi
c = cdsapi.Client()
MONTHS = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]
for month in MONTHS:
result = c.service(
"tool.toolbox.orchestrator.workflow",
params={
"realm": "c3s",
"project": TBD,
"version": "master",
"kwargs": {
"dataset": "reanalysis-era5-single-levels",
"product_type": "reanalysis",
"variable": "total_precipitation",
"statistic": "daily_mean",
"year": "2020",
"month": "month",
"time_zone": "UTC+00:0",
"frequency": "1-hourly",
"grid": "0.25/0.25",
"area": {"lat": [-20, -10], "lon": [40, 30]}
},
"workflow_name": "daily_prec"
})
c.download(result)

@EddyCMWF
Copy link
Collaborator

Hi @LuisHernandoG , please see the answer on #76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants