Closed jeandet closed 1 year ago
raw call stack:
In [2]: spz.amda.get_catalog("sharedcatalog_1") --------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) /usr/lib64/python3.10/urllib/request.py in open_local_file(self, req) 1504 try: -> 1505 stats = os.stat(localfile) 1506 size = stats.st_size FileNotFoundError: [Errno 2] No such file or directory: '/home/jeandet/Documents/prog/speasy/{"error":"No such object sharedcatalog_1 for user impex"}' During handling of the above exception, another exception occurred: URLError Traceback (most recent call last) <ipython-input-2-41164a0829ab> in <module> ----> 1 spz.amda.get_catalog("sharedcatalog_1") ~/Documents/prog/speasy/speasy/core/cache/__init__.py in wrapped(disable_cache, force_refresh, *args, **kwargs) 209 return self.add_to_cache(cache_entry, function(*args, **kwargs)) 210 else: --> 211 return self.get_from_cache(cache_entry) or self.add_to_cache(cache_entry, function(*args, **kwargs)) 212 213 return wrapped ~/Documents/prog/speasy/speasy/webservices/amda/ws.py in get_catalog(self, catalog_id, **kwargs) 391 392 """ --> 393 return self._impl.dl_catalog(to_xmlid(catalog_id), **kwargs) 394 395 def parameter_range(self, parameter_id: str or AMDAParameterIndex or AMDADatasetIndex) -> Optional[DateTimeRange]: ~/Documents/prog/speasy/speasy/core/cache/__init__.py in wrapped(disable_cache, force_refresh, *args, **kwargs) 209 return self.add_to_cache(cache_entry, function(*args, **kwargs)) 210 else: --> 211 return self.get_from_cache(cache_entry) or self.add_to_cache(cache_entry, function(*args, **kwargs)) 212 213 return wrapped ~/Documents/prog/speasy/speasy/webservices/amda/_impl.py in dl_catalog(self, catalog_id, **kwargs) 131 url = rest_client.get_catalog(catID=catalog_id, server_url=self.server_url, **kwargs) 132 if url is not None: --> 133 catalog = load_catalog(url) 134 if catalog: 135 log.debug(f'Loaded catalog: id = {catalog_id}') # lgtm[py/clear-text-logging-sensitive-data] ~/Documents/prog/speasy/speasy/webservices/amda/utils.py in load_catalog(filename) 111 if '://' not in filename: 112 filename = f"file://{os.path.abspath(filename)}" --> 113 with urlopen(filename) as votable: 114 # save the timetable as a dataframe, speasy.common.SpeasyVariable 115 # get header data first /usr/lib64/python3.10/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context) 214 else: 215 opener = _opener --> 216 return opener.open(url, data, timeout) 217 218 def install_opener(opener): /usr/lib64/python3.10/urllib/request.py in open(self, fullurl, data, timeout) 517 518 sys.audit('urllib.Request', req.full_url, req.data, req.headers, req.get_method()) --> 519 response = self._open(req, data) 520 521 # post-process response /usr/lib64/python3.10/urllib/request.py in _open(self, req, data) 534 535 protocol = req.type --> 536 result = self._call_chain(self.handle_open, protocol, protocol + 537 '_open', req) 538 if result: /usr/lib64/python3.10/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args) 494 for handler in handlers: 495 func = getattr(handler, meth_name) --> 496 result = func(*args) 497 if result is not None: 498 return result /usr/lib64/python3.10/urllib/request.py in file_open(self, req) 1481 raise URLError("file:// scheme is supported only on localhost") 1482 else: -> 1483 return self.open_local_file(req) 1484 1485 # names for the localhost /usr/lib64/python3.10/urllib/request.py in open_local_file(self, req) 1520 return addinfourl(open(localfile, 'rb'), headers, origurl) 1521 except OSError as exp: -> 1522 raise URLError(exp) 1523 raise URLError('file not on local host') 1524 URLError: <urlopen error [Errno 2] No such file or directory: '/home/jeandet/Documents/prog/speasy/{"error":"No such object sharedcatalog_1 for user impex"}'>
raw call stack: