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

Different runtime errors occurring depending on whether vtk package is installed or not #513

Closed
ppebay opened this issue May 24, 2024 · 5 comments · Fixed by #515
Closed
Assignees
Labels
bug Something isn't working

Comments

@ppebay
Copy link
Contributor

ppebay commented May 24, 2024

Steps to repeat

Identical as those of #509

Observed errors

If vtk package is not installed via pip

(lbaf39) [pppebay@aneto]~/Documents/Git/LB-analysis-framework/src/lbaf/Applications$ pip uninstall vtk
Found existing installation: vtk 9.1.0
Uninstalling vtk-9.1.0:
  Would remove:
    /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtk-9.1.0.dist-info/*
    /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtk.py
    /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/*
Proceed (Y/n)?  
  Successfully uninstalled vtk-9.1.0
(lbaf39) [pppebay@aneto]~/Documents/Git/LB-analysis-framework/src/lbaf/Applications$ python LBAF_app.py -c ../../../config/test-vt-tv.yaml
Traceback (most recent call last):
  File "/Users/pppebay/Documents/Git/LB-analysis-framework/src/lbaf/Applications/LBAF_app.py", line 19, in <module>
    import lbaf.IO.lbsStatistics as lbstats
  File "/Users/pppebay/Documents/Git/LB-analysis-framework/src/lbaf/__init__.py", line 21, in <module>
    from lbaf.Applications.MoveCountsViewer import MoveCountsViewer
  File "/Users/pppebay/Documents/Git/LB-analysis-framework/src/lbaf/Applications/MoveCountsViewer.py", line 5, in <module>
    import vtk
ModuleNotFoundError: No module named 'vtk'

If vtk package installed via pip

Prior to de-installing it a runtime error occurred, but following uninstallation and re-installation, the following warning is issued:

[LBAF_app] Executing with Python 3.9.19
objc[51824]: Class vtkCocoaTimer is implemented in both /Users/pppebay/Documents/Build/VTK-9.3.0@Release/lib/libvtkRenderingUI-9.3.9.3.dylib (0x102fa8200) and /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingUI-9.3.dylib (0x1203c43e0). One of the two will be used. Which one is undefined.
objc[51824]: Class vtkCocoaFullScreenWindow is implemented in both /Users/pppebay/Documents/Build/VTK-9.3.0@Release/lib/libvtkRenderingOpenGL2-9.3.9.3.dylib (0x103fe4ba0) and /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingOpenGL2-9.3.dylib (0x153e16068). One of the two will be used. Which one is undefined.
objc[51824]: Class vtkCocoaServer is implemented in both /Users/pppebay/Documents/Build/VTK-9.3.0@Release/lib/libvtkRenderingOpenGL2-9.3.9.3.dylib (0x103fe4bc8) and /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingOpenGL2-9.3.dylib (0x153e16090). One of the two will be used. Which one is undefined.
objc[51824]: Class vtkCocoaGLView is implemented in both /Users/pppebay/Documents/Build/VTK-9.3.0@Release/lib/libvtkRenderingOpenGL2-9.3.9.3.dylib (0x103fe4c18) and /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingOpenGL2-9.3.dylib (0x153e160e0). One of the two will be used. Which one is undefined.
objc[51825]: Class vtkCocoaTimer is implemented in both /Users/pppebay/Documents/Build/VTK-9.3.0@Release/lib/libvtkRenderingUI-9.3.9.3.dylib (0x10390c200) and /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingUI-9.3.dylib (0x111fdc3e0). One of the two will be used. Which one is undefined.
objc[51825]: Class vtkCocoaFullScreenWindow is implemented in both /Users/pppebay/Documents/Build/VTK-9.3.0@Release/lib/libvtkRenderingOpenGL2-9.3.9.3.dylib (0x104948ba0) and /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingOpenGL2-9.3.dylib (0x166092068). One of the two will be used. Which one is undefined.
objc[51825]: Class vtkCocoaServer is implemented in both /Users/pppebay/Documents/Build/VTK-9.3.0@Release/lib/libvtkRenderingOpenGL2-9.3.9.3.dylib (0x104948bc8) and /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingOpenGL2-9.3.dylib (0x166092090). One of the two will be used. Which one is undefined.
objc[51825]: Class vtkCocoaGLView is implemented in both /Users/pppebay/Documents/Build/VTK-9.3.0@Release/lib/libvtkRenderingOpenGL2-9.3.9.3.dylib (0x104948c18) and /Users/pppebay/miniconda3/envs/lbaf39/lib/python3.9/site-packages/vtkmodules/.dylibs/libvtkRenderingOpenGL2-9.3.dylib (0x1660920e0). One of the two will be used. Which one is undefined.

but code runs to completion.

It remains concerning to have this warning, especially considering the fact that before uninstall/reinstall it resulted in a segfault as follows:

zsh: segmentation fault  python LBAF_app.py -c ../../../config/test-vt-tv.yaml
@ppebay ppebay added the bug Something isn't working label May 24, 2024
@ppebay
Copy link
Contributor Author

ppebay commented May 24, 2024

Question @pierrepebay, when code is running, a PNG image is generated as expected, which is good, however I am curious about the new shape of the inter-object edges:

output_file0

Is this normal (assuming this is to indicate directionality, how does this scale)? We did not have this in LBAF-Viz; this may be an improvement but I am unsure.

@pierrepebay
Copy link
Contributor

@ppebay

Is this for the /data/synthetic_lb_data ? If so, this is my output image:
image

@ppebay
Copy link
Contributor Author

ppebay commented May 24, 2024

Yes @pierrepebay I was getting the triangle above with the test-vt-tv.yaml config files. It seems that those triangular edges are thus some incorrect VTK artifact, aren't they?

@ppebay ppebay reopened this May 24, 2024
@pierrepebay
Copy link
Contributor

@ppebay it does seem that there are some artifacts, but notice as well that some edges are missing entirely in your output as well.

@ppebay
Copy link
Contributor Author

ppebay commented May 24, 2024

Yes so really seems to be a bug. I am re-closing this issue and creating a new (bug) one.

@ppebay ppebay closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants