Skip to content

Trying to fetch a dust map raises a JSONDecodeError #54

@ahlamaq

Description

@ahlamaq

I am trying to download one of the dust maps and encounter the following error, regardless of whether I try to download the map via pip [ eg. dustmaps.bayestar.fetch() ] or manually via setup.py [ eg. python setup.py fetch --map-name=bayestar ]:

File "/anaconda3/lib/python3.11/site-packages/dustmaps/bayestar.py", line 628, in fetch
    fetch_utils.dataverse_download_doi(
  File "/anaconda3/lib/python3.11/site-packages/dustmaps/fetch_utils.py", line 400, in dataverse_download_doi
    metadata = dataverse_search_doi(doi)
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/anaconda3/lib/python3.11/site-packages/dustmaps/fetch_utils.py", line 367, in dataverse_search_doi
    return json.loads(r.text)
           ^^^^^^^^^^^^^^^^^^
  File "/anaconda3/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/anaconda3/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/anaconda3/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

This error is actually raised regardless of which dust map I try to download. Any help in resolving this would be much appreciated, since I cannot currently access any of the dust maps from this package.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions