AttributeError: module 'opengate_core' has no attribute 'GateMotionVolumeActor' — occurs at import time #744
-
|
I’m encountering an error immediately when importing opengate in a basic script. The full traceback is: Traceback (most recent call last):
File "z_qmc_simulation.py", line 1, in <module>
import opengate as gate
File ".../opengate/__init__.py", line 32, in <module>
from .actor.helpers_actor import *
File ".../opengate/actor/helpers_actor.py", line 12, in <module>
from .MotionVolumeActor import *
File ".../opengate/actor/MotionVolumeActor.py", line 5, in <module>
class MotionVolumeActor(g4.GateMotionVolumeActor, gate.ActorBase):
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'opengate_core' has no attribute 'GateMotionVolumeActor'I verified that opengate_core is importable and inspected its contents: python -c "import opengate_core; print(dir(opengate_core))"This error occurs during the import process, specifically inside: opengate/actor/helpers_actor.py
→ from .MotionVolumeActor import *
→ class MotionVolumeActor(g4.GateMotionVolumeActor, ...)I inspected my opengate_core installation with: python -c "import opengate_core; print(dir(opengate_core))"The module contains many Environment: Let me know if you need my Thanks in advance for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
the MotionVolumeActor does not exist anymore. This concept has been replaced by dynamic parametrisation. Unfortunately, I cannot find the documentation about this concept (@nkrah ?), but you can find examples here : |
Beta Was this translation helpful? Give feedback.
-
|
@janikvhrubant : Please try to start from the test030 that @dsarrut shared with you, but do not hesitate to post any question! |
Beta Was this translation helpful? Give feedback.
the MotionVolumeActor does not exist anymore. This concept has been replaced by dynamic parametrisation. Unfortunately, I cannot find the documentation about this concept (@nkrah ?), but you can find examples here :
https://github.com/OpenGATE/opengate/blob/master/opengate/tests/src/test030_dose_motion_dynamic_param.py