Skip to content

Cannot retrieve data for multiurl raised unreleated error #54

@Bing1996

Description

@Bing1996

demo code is used from code

from ecmwf.opendata import Client

client = Client()

client.retrieve(
    step=240,
    type="fc",
    param="msl",
    target="data.grib2",
)

it returns whatever I changed my code:

Traceback (most recent call last):
  File "/home/shengbin/github/testx/main.py", line 5, in <module>
    client.retrieve(
  File "/home/shengbin/github/testx/.venv/lib/python3.12/site-packages/ecmwf/opendata/client.py", line 147, in retrieve
    result.size = download(
                  ^^^^^^^^^
  File "/home/shengbin/github/testx/.venv/lib/python3.12/site-packages/multiurl/downloader.py", line 111, in download
    return Downloader(url, **kwargs).download(target)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/shengbin/github/testx/.venv/lib/python3.12/site-packages/multiurl/base.py", line 126, in download
    desc=self.title(),
         ^^^^^^^^^^^^
  File "/home/shengbin/github/testx/.venv/lib/python3.12/site-packages/multiurl/http.py", line 126, in title
    return params["filename"]
           ~~~~~~^^^^^^^^^^^^
TypeError: string indices must be integers, not 'str'

And my pip venv only install ecmwf-opendate, and it's the same error for my other production code. It seems about ecmwf opendata server internal error, but it raised the TypeError. The more odd thing is the code mentioned above still can work yesterday.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions