Skip to content

igrf14coeffs.txt cannot be found using default installation via pip #14

@mattlast

Description

@mattlast

Problem statement:

There was a previous installation of 0.3.3, which operated correctly. I upgraded to v1.0.0 using pip install pyIGRF --upgrade. After a successful upgrade, I attempted to re-run my script, but got the following errors:

import pyIGRF # Geomagnetic field model
File "/Users/testaccount/Documents/project/venvdir/lib/python3.9/site-packages/pyIGRF/init.py", line 11, in
from pyIGRF.value import igrf_variation, igrf_value
File "/Users/testaccount/Documents/project/venvdir/lib/python3.9/site-packages/pyIGRF/value.py", line 3, in
import pyIGRF.calculate as calculate
File "/Users/testaccount/Documents/project/venvdir/lib/python3.9/site-packages/pyIGRF/calculate.py", line 5, in
from pyIGRF.loadCoeffs import get_coeffs
File "/Users/testaccount/Documents/project/venvdir/lib/python3.9/site-packages/pyIGRF/loadCoeffs.py", line 35, in
gh = load_coeffs(os.path.dirname(os.path.abspath(file)) + '/src/igrf14coeffs.txt')
File "/Users/testaccount/Documents/project/venvdir/lib/python3.9/site-packages/pyIGRF/loadCoeffs.py", line 15, in load_coeffs
with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/testaccount/Documents/project/venvdir/lib/python3.9/site-packages/pyIGRF/src/igrf14coeffs.txt'

Hypotheses:

  • Looking at the merged pull request update to igrf14 and remove numpy #13 , I suspect that pyIGRF.egg-info/SOURCES.txt may have been modified incompletely, especially this line where the igrf13coeffs.txt file is removed, but not replaced with the igrf14coeffs.txt file:
- pyIGRF.egg-info/top_level.txt
- pyIGRF/src/igrf13coeffs.txt
+ pyIGRF.egg-info/top_level.txt
  • Is it a requirement to manually download & install the igrf14coeffs.txt file?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions