Skip to content

example data not being pulled into ams processing notebook #62

@kaakin

Description

@kaakin

In the anisotropy_plot_AMS notebook, the lines:

dir_path = 'example_data/anisotropy_slump'
result, magic_file = ipmag.download_magic_from_id('19571', directory=dir_path)
ipmag.unpack_magic(magic_file, dir_path, print_progress=False)
contribution = cb.Contribution(dir_path)

give an error message of this:

AttributeError                            Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_13288\2637364914.py in ?()
      1 dir_path = 'example_data/anisotropy_slump'
----> 2 result, magic_file = ipmag.download_magic_from_id('19571', directory=dir_path)
      3 ipmag.unpack_magic(magic_file, dir_path, print_progress=False)
      4 contribution = cb.Contribution(dir_path)

~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pmagpy\ipmag.py in ?(magic_id, directory, share_key)
   5329     api = f'https://api.earthref.org/v1/MagIC/data'
   5330     params = {'id': magic_id, 'key': share_key} if share_key else {'id': magic_id}
   5331 
   5332     # Perform the request
-> 5333     response = requests.get(api, params=params)
   5334 
   5335     if response.status_code == 200 and response.text:
   5336         # Write the content to the file only if the request was successful and the content is not empty

AttributeError: 'NoneType' object has no attribute 'get'

Metadata

Metadata

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