VSP Import Failed

418 views
Skip to first unread message

Jon Watts

unread,
Mar 14, 2022, 11:45:30 AM3/14/22
to OpenVSP
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

Rob McDonald

unread,
Mar 14, 2022, 1:23:04 PM3/14/22
to OpenVSP
I'm sorry I can't be more helpful, but that looks like a problem with the SUAVE wrapper around OpenVSP.

It may be an underlying OpenVSP problem, but I don't know exactly what SUAVE is doing under the hood there.

Rob

deenri...@gmail.com

unread,
Mar 14, 2022, 5:06:40 PM3/14/22
to OpenVSP
This is indeed an issue with SUAVE. Make sure the write_vsp function is importing your vsp module correctly. I had to change the import lines in all the vsp write scripts. 
Message has been deleted

Jon Watts

unread,
Mar 15, 2022, 5:28:08 AM3/15/22
to OpenVSP
Also apologies, I cannot seem to reply to responses individually so I'll have to number them accordingly instead!

Kind regards,
Jon

On Tuesday, March 15, 2022 at 9:27:16 AM UTC Jon Watts wrote:
Thanks Rob for your input anyway!

I don't suppose you could give me an idea of what you changed your import lines from and to could you? I'm interested to know in what they differ potentially from what I have at the moment.

Kind regards,
Jon

Jon Watts

unread,
Mar 15, 2022, 5:28:53 AM3/15/22
to OpenVSP
1) Thanks Rob for your input anyway!

2) I don't suppose you could give me an idea of what you changed your import lines from and to could you? I'm interested to know in what they differ potentially from what I have at the moment.

Kind regards,
Jon

Jon Watts

unread,
Mar 20, 2022, 6:42:51 AM3/20/22
to OpenVSP
Hi all,

I just wanted to give everyone an update on this - it was an issue with SUAVE as Rob suggested and as per the release of 2.5.2 that addressed its compatibility with the latest version of OpenVSP, this problem has been resolved and the code now generates the .vsp3 files without any issue.

Kind regards,
Jon

Rob McDonald

unread,
Mar 20, 2022, 2:24:07 PM3/20/22
to ope...@googlegroups.com
You're being a bit too kind to me here.

It seems that I broke something (that I still don't understand), but that the SUAVE team found a workaround for and have incorporated that into the latest version.

So, it was OpenVSP's problem -- but they fixed it.

Rob


--
You received this message because you are subscribed to the Google Groups "OpenVSP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openvsp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openvsp/d372a7a6-cef1-4d49-b498-17001a8386b4n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages