ebranlard / pyDatView

A crossplatform GUI to plot tabulated data from files (e.g. CSV, Excel, OpenFAST, HAWC2, Flex...), or python pandas dataframes
MIT License
109 stars 43 forks source link

numpy.object error #163

Closed mlidGWT closed 1 year ago

mlidGWT commented 1 year ago

Hello,

I am trying to run pyDatView for the first time on my Mac Mini with M2 Apple Silicon. I followed the command line installation instructions, which executed successfully until the 'make' command, which would try to open the GUI but then show an error pop up with the below message.

I am using Miniconda rather than full Anaconda - not sure if that might be causing or contributing to the issue.

In trying to debug, I ran conda update python.app (twice, actually), which did not solve the issue. I then tried replacing ./pythonmac pyDatView.py with my path to python: /Users/meglidrbauch/miniconda3/bin/python.app pyDatView.py. This seemed to enable the base GUI to load without an error, but then when I tried to drag in an .outb file the same error below would pop up.

I do not consider myself a skilled coder or computer user (especially not MacOS) by any extent, so please forgive me if this has basic troubleshooting steps!

Error message:

The following exception occured:

AttributeError: module 'numpy' has no attribute 'object'. np.object was a deprecated alias for the builtin object. To avoid this error in existing code, use object by itself. Doing this will not modify any behavior and is safe. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

File "/Users/meglidrbauch/miniconda3/lib/python3.10/site-packages/numpy/init.py", line 313, in getattr raise AttributeError(__former_attrs__[attr])

Image 8-8-23 at 10 17 AM

ebranlard commented 1 year ago

Hi @mlidGWT

Thank you for reporting this issue and sorry for getting back to you only now. Can you try using the latest dev branch of pydatview? I don't see np.object being used anywhere in the latest dev. Potentially, make sure to use the latest numpy version: pip install --upgrade numpy Let me know if you still have an issue, but this seems like a python issue not a pyDatView issue.

DuncanGWT commented 1 year ago

Hi @ebranlard

I ran into the same issue as @mlidGWT. In an attempt to fix the error related to np.object I changed my numpy version to the last version that still supported np.object, version 1.23.4. This did allow pyDatView to run my .outb file but it feels like using an older version is not an optimal solution. I would like to find anywhere in the code that np.object is and replace it with object but I am not sure where I should make that correction. Is this related more to the openfast version used in WEIS or is it pyDatView? Do you have anymore insight into this problem?

I am considering doing what is suggested in this thread but I am not sure which file to edit.

I am not sure if this is related but I am now also getting this error

image
DuncanGWT commented 1 year ago

The thread mention above https://stackoverflow.com/questions/75069062/module-numpy-has-no-attribute-object

ebranlard commented 1 year ago

Hi @DuncanGWT Sorry that you are running into this issue. Can you try with the dev branch of pyDatView? Please do a clean clone to get the dev branch to avoid issues with submodules:

git clone https://github.com/ebranlard/pyDatView -b dev pydatview-New-Folder

(adapt if you want a different folder, or delete your previous folder) Let me know if you still have issues.