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
string indices must be integers
Traceback (most recent call last):
File "[/Users/cgr/git/earthkit-data/src/earthkit/data/utils/lazy.py", line 32](http://localhost:8888/lab/tree/_dev/writers/src/earthkit/data/utils/lazy.py#line=31), in source
self._source = from_source(
File "[/Users/cgr/git/earthkit-data/src/earthkit/data/sources/__init__.py", line 150](http://localhost:8888/lab/tree/_dev/writers/src/earthkit/data/sources/__init__.py#line=149), in from_source
src = get_source(name, *args, **kwargs)
File "[/Users/cgr/git/earthkit-data/src/earthkit/data/sources/__init__.py", line 131](http://localhost:8888/lab/tree/_dev/writers/src/earthkit/data/sources/__init__.py#line=130), in __call__
source = klass(*args, **kwargs)
File "[/Users/cgr/git/earthkit-data/src/earthkit/data/core/__init__.py", line 22](http://localhost:8888/lab/tree/_dev/writers/src/earthkit/data/core/__init__.py#line=21), in __call__
obj.__init__(*args, **kwargs)
File "[/Users/cgr/git/earthkit-data/src/earthkit/data/sources/url.py", line 217](http://localhost:8888/lab/tree/_dev/writers/src/earthkit/data/sources/url.py#line=216), in __init__
self._download()
File "[/Users/cgr/git/earthkit-data/src/earthkit/data/sources/url.py", line 272](http://localhost:8888/lab/tree/_dev/writers/src/earthkit/data/sources/url.py#line=271), in _download
self.path = self.cache_file(
File "[/Users/cgr/git/earthkit-data/src/earthkit/data/sources/__init__.py", line 68](http://localhost:8888/lab/tree/_dev/writers/src/earthkit/data/sources/__init__.py#line=67), in cache_file
return cache_file(owner, create, args, **kwargs)
File "[/Users/cgr/git/earthkit-data/src/earthkit/data/core/caching.py", line 1022](http://localhost:8888/lab/tree/_dev/writers/src/earthkit/data/core/caching.py#line=1021), in cache_file
owner_data = create(path + ".tmp", args)
File "[/Users/cgr/git/earthkit-data/src/earthkit/data/sources/url.py", line 269](http://localhost:8888/lab/tree/_dev/writers/src/earthkit/data/sources/url.py#line=268), in download
self.downloader.download(target)
File "[/Users/cgr/git/multiurl/multiurl/base.py", line 126](http://localhost:8888/Users/cgr/git/multiurl/multiurl/base.py#line=125), in download
desc=self.title(),
File "[/Users/cgr/git/multiurl/multiurl/http.py", line 130](http://localhost:8888/Users/cgr/git/multiurl/multiurl/http.py#line=129), in title
return params["filename"]
TypeError: string indices must be integers
Version
0.3.2
Platform (OS and architecture)
any
Relevant log output
No response
Accompanying data
No response
Organisation
ECMWF
The text was updated successfully, but these errors were encountered:
This should resolveecmwf#21 which should also solve
ecmwf/ecmwf-opendata#54.
The parsing function returns a dictionary, not a tuple. If we
tuple-unpack a dictionary, that will give us the keys of the *first
two* dictionary entries. If there are more than two entries it would
raise a ValueError (too many values to unpack).
This should resolve#21 which should also solve
ecmwf/ecmwf-opendata#54.
The parsing function returns a dictionary, not a tuple. If we
tuple-unpack a dictionary, that will give us the keys of the *first
two* dictionary entries. If there are more than two entries it would
raise a ValueError (too many values to unpack).
What happened?
It seems #15 breaks the http access. The attached example works with 0.3.1 but broken in 0.3.2.
The problem comes from this method in
http.py
:Here
parse_separated_header()
returns a dict so the return value does not seem to be treated correctly.What are the steps to reproduce the bug?
Use this code with earthkit.data and multiurl=0.3.2:
This will generate the following error:
Version
0.3.2
Platform (OS and architecture)
any
Relevant log output
No response
Accompanying data
No response
Organisation
ECMWF
The text was updated successfully, but these errors were encountered: