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

Problem with interactive view #226

Open
mturiansky opened this issue Apr 14, 2024 · 3 comments
Open

Problem with interactive view #226

mturiansky opened this issue Apr 14, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@mturiansky
Copy link

Description

I'm running into a problem with the interactive view with code that had previous run fine before updating my environment. I presume one of the updated libraries is the problem (I suspect something with pyside2). The problem occurs when manipulating a scene in the interactive view:

Output

TypeError: 'PySide2.QtCore.Qt.KeyboardModifier' object cannot be interpreted as an integer

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/mark/.virtualenvs/abcv/lib/python3.11/site-packages/fresnel/interact.py", line 315, in mouseMoveEvent
    self._camera_controller.orbit(yaw=delta.x(),
  File "/home/mark/.virtualenvs/abcv/lib/python3.11/site-packages/fresnel/interact.py", line 63, in orbit
    basis = numpy.array(self._start_camera.basis)
                        ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mark/.virtualenvs/abcv/lib/python3.11/site-packages/fresnel/camera.py", line 124, in basis
    b = _common.CameraBasis(self._camera)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <class 'fresnel._common.CameraBasis'> returned a result with an exception set

The above issue gets repeated several times and the camera is not updated upon dragging. I can verify that self.scene.camera.basis was valid before going into the interactive view. I can also generate images non-interactively.

Configuration

I compiled the code myself on my Arch linux machine using the CPU to render the images. Here are some of the versions:

Platform:

  • Linux
  • CPU

Installation method:

  • Compiled from source

Versions:

  • Python version: 3.11.8
  • Fresnel version: 0.13.5
  • QHull: 2020.2-4
  • Embree: 4.3.1-1
  • Pyside2: 5.13.2
  • Numpy: 1.26.4
  • Pybind11: 2.12.0-2
  • Cmake: 3.29.1-1
  • GCC: 13.2.1-5

Developer

Sure.

As a side note, I didn't see rowan listed as a dependency in the install instructions. This caused an error when importing fresnel after installing it, which of course was easily fixed by explicitly installing it.

@mturiansky mturiansky added the bug Something isn't working label Apr 14, 2024
@joaander
Copy link
Member

Thanks for reporting. It is possible that the API for PySide2.QtCore.Qt.KeyboardModifier has changed. Feel free to submit a pull request that fixes the problem.

@mturiansky
Copy link
Author

If I find some time, I'll take a look at it. It looks like PySide2 is eventually going to be phased out with PySide6. Any opposition to updating the dependency if it helps to resolve the problem?

@joaander
Copy link
Member

Yes, please feel free to update fresnel to the latest version of the PySide.

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
Development

No branches or pull requests

2 participants