Hi everyone,
After battling with this for the last few days and not really getting any further forwards, I'm hoping that someone on here may be able to help.
First of all I am VERY new to Python, so have been trying to get to grips with it over quite a steep learning curve these last few days, so apologies in advance if I miss anything here out through nothing but ignorance!
As some additional context, I am trying to run OpenVSP alongside SUAVE and generate a surface model of the designed vehicle from the script. The script is an edited version of the Boeing 737-800 SUAVE tutorial with simplistic changes of aircraft parameters and mission profile which on its own has run perfectly fine without any errors, but when incorporating the OpenVSP lines of code begins to run into trouble. I am also doing this on a Windows machine, using Anaconda 2.1.2, the built-in Spyder API and Python 3.9.7.
I manually compiled OpenVSP following a combination of the instructions from the GitHub page and a workshop presentation from a couple of years ago (to cover the Python API aspect using SWIG). To the best of my knowledge I have done that correctly as:
1) I used the Anaconda Powershell to execute the "setup.ps1" file in the "...OpenVSP-3.26.1-win64/Python" directory from the final packaged result of OpenVSP (as per the last instruction of the GitHub installation guide).
2) When executing "conda list" into the Anaconda CMD, "openvsp" appears on the list under version 3.26.1.
3) When executing "import openvsp" in the Spyder command window/script line there are no errors referring to the module being unknown.
4) Executing the "test.py" script provides no errors and generates all outputs successfully.
However, in my script when I attempt to import some of the OpenVSP related "write" related functions using:
"from SUAVE.Input_Output.OpenVSP import write" and " write(vehicle, 'Modified_Tut_V1_Vehicle')",
so that they can be called later to build the aircraft surface model, I am presented with the error:
"Reseting OpenVSP Model in Memory
VSP import failed".
I also get the same error when similar commands are used in other SUAVE tutorials that make use of OpenVSP so I don't believe its something specific to how I have called the OpenVSP function.
Also I have made sure that everything has been added to the system paths (unless there is something more specific to OpenVSP that I need to add).
At this point, I am well and truly baffled as to why this is happening and despite looking at other discussions where this type of error has occurred before - none of the various fixes/checks seem to have helped in my case.
Any input would be greatly appreciated and I'm more than happy to answer any questions!
Kind regards,
Jon