Skip to content

Trying to fetch a dust map raises a JSONDecodeError #54

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions