Skip to content
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

numpy issue + missing ) #57

Open
marius26 opened this issue Apr 14, 2024 · 6 comments
Open

numpy issue + missing ) #57

marius26 opened this issue Apr 14, 2024 · 6 comments

Comments

@marius26
Copy link

Hello,
I'm trying to use this gui for my bachelor's final year project and I'm having some issues. I'm pretty new to python and git so I apologises if I'm complaining about something silly..
I'm getting this when I try to run the gui using the command line. Line 602 has a missing ")" which I fixed in my local script but I can't push it into the git.
pi@raspberrypi:~ $ python3 -m openpivgui.OpenPivGui Traceback (most recent call last): File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/lib/python3.9/runpy.py", line 158, in _get_module_details code = loader.get_code(mod_name) File "<frozen importlib._bootstrap_external>", line 923, in get_code File "<frozen importlib._bootstrap_external>", line 853, in source_to_code File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed File "/home/pi/.local/lib/python3.9/site-packages/openpivgui/OpenPivGui.py", line 602 data=data.to_numpy().astype(float)
No matter what I do in my local python script (OpenPivGui.py - np.int32 -> int) I can't get rid of the error (deprecated). I've managed somehow to get rid of it (uninstalled openpiv 2.38 and installed latest one), I started the gui but now I'm getting this error when I click on the process image
'numpy.ndarray' object has no attribute 'mask'

I hope this makes sense, I requested to join into the google group to raise this issue but I'm assuming the invitation is still pending.

@alexlib
Copy link
Member

alexlib commented Apr 14, 2024

the problem is incompatability of this GUI with more recent openpiv > 0.23.8. I can fix it, but I am not sure how to redistribute it

see here
https://www.dropbox.com/scl/fo/7wr09eshduhad3o6votk8/AEzYiwBHJ26CrxrufeDSlzg?rlkey=znunu0gl8j9hlhhnkv8om8l0j&dl=0

@alexlib
Copy link
Member

alexlib commented Apr 14, 2024

'numpy.ndarray' object has no attribute 'mask'

this means you didn't uninstall openpiv

@alexlib
Copy link
Member

alexlib commented Apr 14, 2024

Ok, let's try this:

conda create -n openpivgui python=3.12
conda activate openpivgui
pip install git+https://github.com/alexlib/openpiv-python-0.23.8
pip install openpivgui
python -m openpivgui.OpenPivGui

@marius26
Copy link
Author

marius26 commented Apr 15, 2024

Ok, let's try this:

conda create -n openpivgui python=3.12
conda activate openpivgui
pip install git+https://github.com/alexlib/openpiv-python-0.23.8
pip install openpivgui
python -m openpivgui.OpenPivGui

I followed the above steps and I'm getting this when I try to start the script.
/home/pi/miniforge3/envs/openpivgui/lib/python3.12/site-packages/openpivgui/OpenPivGui.py:536: SyntaxWarning: invalid escape sequence '\C' options2.add_command(label='Algorithms\Calibration', Traceback (most recent call last): File "<frozen runpy>", line 189, in _run_module_as_main File "<frozen runpy>", line 159, in _get_module_details File "<frozen importlib._bootstrap_external>", line 1129, in get_code File "<frozen importlib._bootstrap_external>", line 1059, in source_to_code File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed File "/home/pi/miniforge3/envs/openpivgui/lib/python3.12/site-packages/openpivgui/OpenPivGui.py", line 601 data = self.load_pandas(self.p['fnames'][self.index] ^ SyntaxError: '(' was never closed (openpivgui) pi@raspberrypi:~ $

Is the same error as I had it before, line 601 has a missing ")"

EDIT:

Please forgive me, I've located the python script (OpenPivGui.py), corrected line 601 and everything works perfect!

@alexlib
Copy link
Member

alexlib commented Apr 15, 2024

if you fix this bug, does it work?

@mariush26
Copy link

if you fix this bug, does it work?

Apologies for late response, my account got hacked and I lost access to that account (no idea why someone removed my email address and added theirs into the account - maybe just for fun). Everything seems to work fine, but I can only start the script by using the command line (not sure why).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants