SilentSys / orhelper

orhelper is a module which aims to facilitate interacting and scripting with OpenRocket from Python
GNU General Public License v2.0
16 stars 17 forks source link

Java exception #3

Closed yuriachermann closed 2 years ago

yuriachermann commented 2 years ago

Hello, Andrei

I'm working using the orhelper, but I had to format my notebook and the library is not working for me anymore... I get this error:

:25:17.545 [main] INFO n.s.o.s.providers.TranslatorProvider - Using default locale en_US 23:25:17.561 [main] INFO n.s.o.s.providers.TranslatorProvider - Set up translation for locale en_US, debug.currentFile=messages.properties 23:25:17.569 [DatabaseLoadingThread] INFO n.s.o.d.ComponentPresetDatabaseLoader - Loading component presets from datafiles/presets Exception while calling OpenRocket Traceback (most recent call last): File "Simulation.java", line 336, in net.sf.openrocket.document.Simulation.simulate File "BasicEventSimulationEngine.java", line 73, in net.sf.openrocket.simulation.BasicEventSimulationEngine.simulate Exception: Java Exception

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

Traceback (most recent call last): File "/home/yuri/OR/or_simulation.py", line 12, in run_simulation orh.run_simulation(sim) File "/home/yuri/OR/venv/lib/python3.8/site-packages/orhelper/_orhelper.py", line 248, in run_simulation sim.simulate(listener_array) net.sf.openrocket.simulation.exception.net.sf.openrocket.simulation.exception.MotorIgnitionException: Traceback (most recent call last): File "Simulation.java", line 336, in net.sf.openrocket.document.Simulation.simulate File "BasicEventSimulationEngine.java", line 73, in net.sf.openrocket.simulation.BasicEventSimulationEngine.simulate Exception: Java Exception

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

Traceback (most recent call last): File "/home/yuri/OR/or_simulation.py", line 24, in print("\nApogeu =", round(run_simulation(), 2), "m") File "/home/yuri/OR/or_simulation.py", line 12, in run_simulation orh.run_simulation(sim) File "/home/yuri/OR/venv/lib/python3.8/site-packages/orhelper/_orhelper.py", line 248, in run_simulation sim.simulate(listener_array) net.sf.openrocket.simulation.exception.MotorIgnitionException: <exception str() failed>

Process finished with exit code 1

What problem do you think can it be?

Thanks in advance!

SilentSys commented 2 years ago

In case someone has this issue in the future. Please add the cause and solution here. Thanks.

yuriachermann commented 2 years ago

The problem was caused by the lack of the motor added on the OpenRocket system.

I was struggling with that until I found out my motor wasn't already added to the software thrust curves. So I went to Edit > Preferences, and added the .eng file to the "User-defined thrust curves"