PmagPy / PmagPy/RockmagPy-notebooks

example data not being pulled into ams processing notebook

Open
#62 0 comments 1 reaction 2 assignees View on GitHub

@Swanson-Hysell is already working on this.

Since Jan 28, 2026.

Dominant language
Jupyter Notebook
Stars
12
Forks
8
PR merge metrics
No merged PRs in 30d

Description

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'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.