OpenPIV / openpiv_tk_gui

Tkinker GUI for OpenPIV-Python (requires Python 3)
Other
31 stars 20 forks source link

numpy issue + missing ) #57

Open marius26 opened 5 months ago

marius26 commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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

this means you didn't uninstall openpiv

alexlib commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

if you fix this bug, does it work?

mariush26 commented 5 months ago

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).