Closed TeriForey closed 4 years ago
That's odd, I think I might know what the problem is though, it looks like you have an old version of DateTimeTools
installed. I don't appear to have put the updated version on PyPI yet either. (Sorry about that!)
Either tomorrow or Monday, I will update DateTimeTools
on PyPI so that it can be installed with pip3
and I will put a minimum version requirement on it in the setup.py
of this module. In the mean time, you could uninstall DateTimeTools
and then clone the most recent code from https://github.com/mattkjames7/DateTimeTools
- just install with python3 setup.py install --user
.
Well I got further with the latest DateTimeTools
, new error is:
No files to update.
Reading OMNI Data
Reading Kp Indices
Creating output array
Interpolating fields
Calculating dipole tilt angles
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/anaconda/envs/SMILE_dev/lib/python3.8/site-packages/PyGeopack/UpdateParameters.py", line 51, in UpdateParameters
data = _CalculateParameters(SkipWParameters)
File "/anaconda/envs/SMILE_dev/lib/python3.8/site-packages/PyGeopack/_CalculateParameters.py", line 391, in _CalculateParameters
data.Tilt = GetDipoleTilt((data.Year,data.DayNo),(data.Hr,data.Mn),(data.Vx,data.Vy,data.Vz))
File "/anaconda/envs/SMILE_dev/lib/python3.8/site-packages/PyGeopack/GetDipoleTilt.py", line 43, in GetDipoleTilt
psi[i] = _CGetDipoleTilt(Date[i],ut[i],Vx[i],Vy[i],Vz[i])
ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type
Hi Teri,
I think I have fixed this now, the new version of PyGeopack
(0.2.5) is on PyPI now, along with the new version of DateTimeTools
(0.0.6). I have changed setup.py
so that it requires "DateTimeTools>=0.0.6"
. I have also change it such that hopefully when it fails to load libgeopackdp.so
it should attempt to recompile it.
Cheers,
Matt.
It works! I reinstalled PyGeopack and on import it recompiled (successfully) the libgeopackdp.so
. The updateParameters() ran successfully too! Thank you for all your help 😄
Great stuff, glad to help!
Hi @mattkjames7
Sorry, but I found another problem. Whenever I run
gp.UpdateParameters(SkipWParameters=True)
it returns the following error:It then continues to warn me that the data file is missing, and when I tested out the TraceField functions it returned empty arrays.