-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with version 0.3.0, Python 3.10 and Ubuntu 22.04 #113
Comments
Pascal, what is the version of numpy you are using? |
Also, I just now tried to reproduce this on ubuntu 22.04, with
It works, no problem. But this is with the Ubuntu 22.04 |
Thank you for your answers but I have Ubuntu 22.04.1 and the default version of Python is 3.10.6-1~22.04 and not 3.8. |
You are at least partly correct: I was confused about the ubuntu version on the other machine I tried. I think there are clues in your traceback, e.g.:
For Utide 0.3.0, this is line 298, not 288. So it seems that what you have installed somehow is In general I recommend the use of miniconda, with a minimal base environment, and one or more |
Thank you, but I am sorry, I verified the code and the code I use (which is installed) is the same as utilities.py and the error 'structured_to_bunch' is well on line 298 but it seems to refer to line 288 : |
Not really. Can you please provide:
I just tested on the same Ubuntu with the system Python, creating a python 3.10 environment with pyenv, and everything works. |
Thank you. |
And excuse my very bad english, please. |
Congratulations to efiring and ocefpaf for your responsiveness. |
Not a problem. Don't worry about it.
You are using system python.
You should consider using it. Otherwise many issues and incompatibilities will arise from mixing packages are Ubuntu and PyPI updates them.
The former is OK if it is inside an environment. The latter, using sudo, is not recommended at all. You should consider stop using sudo to install packages with pip. Here is my environment pretty close to yours:
And this is how I tested it:
However, I highly recommend you to start using miniconda/miniforge instead. See https://ioos.github.io/ioos_code_lab/content/ioos_installation_conda.html for some instructions on how to do that. PS: I'm 90% sure that the problem you are seeing is a bad mix of apt installed packages and pip. Without the results of |
Here is the result of pip freeze : Also, When I try the test_solve.py (in the directory tests of UTide-0.3.0), I get warnings : It seems that the tests in the directory 'tests' of UTide-0.3.0 works, so the problem is surely in my program but my program works fine in Ubuntu 20.04.5 with Python 3.8 so I don't understand where is the problem with Ubuntu 22.04.1 and Python 3.10. I try on 3 differents computers. |
Those warnings indicate that you are not now encountering the original exception, |
Thank you.
but that does not work ! Why ? |
WHen I run my program, I get absurd results for A, g, ... and I have the warnings :
In my data, the interval of time is da[1]-da[0]=0.0069444444961845875 (that is ten minutes). What is the problem in periodogram.py ? |
I think that I solve my problem. I have to add epoch='matlab' in the opts ! |
But is there a doc for the new version ? |
Yes. See the docstring for solve. Here is the top part:
|
Solved ! |
Good morning,
I tried my old program with the new version 0.3.0 under Python 3.10 and I cannot make it work
When I try
from utide import solve,reconstruct
I get the error `
Traceback (most recent call last):
File "/tmp/ipykernel_3117/1389739857.py", line 1, in
from utide import solve,reconstruct
File "/home/pascal/.local/lib/python3.10/site-packages/utide/init.py", line 3, in
from ._solve import solve
File "/home/pascal/.local/lib/python3.10/site-packages/utide/_solve.py", line 9, in
from .harmonics import ut_E
File "/home/pascal/.local/lib/python3.10/site-packages/utide/harmonics.py", line 11, in
from ._ut_constants import ut_constants
File "/home/pascal/.local/lib/python3.10/site-packages/utide/_ut_constants.py", line 13, in
ut_constants = loadbunch(_ut_constants_fname, masked=False)
File "/home/pascal/.local/lib/python3.10/site-packages/utide/utilities.py", line 288, in loadbunch
out[k] = _structured_to_bunch(xx[k], masked=masked)
File "/usr/lib/python3/dist-packages/numpy/lib/npyio.py", line 254, in getitem
return format.read_array(bytes,
File "/usr/lib/python3/dist-packages/numpy/lib/format.py", line 743, in read_array
raise ValueError("Object arrays cannot be loaded when "
ValueError: Object arrays cannot be loaded when allow_pickle=False
The text was updated successfully, but these errors were encountered: