B737_AVL_Tutorial OSError: [WinError 193] %1 is not a valid Win32 application

178 views
Skip to first unread message

Yash Thummar

unread,
Feb 22, 2023, 1:59:45 PM2/22/23
to SUAVE FORUM
Hello,

I want to use AVL aerodynamic method and for that to understand the AVL method I am trying to run B737_AVL_Tutorial as per the Tutorial given but still, I am getting the error. I have already changed the directory path here is the Screenshot.

 Screenshot 2023-02-22 234805.png
You can see the Aerodynamics and Stability file path here:
Screenshot 2023-02-22 235154.png
AScreenshot 2023-02-22 235241.png
Also, avl_files is in the Tutorial folder which contains these files: batch_0001.run, Boeing_737-800.avl, Boeing_737-800.mass, commands_0001.deck
BScreenshot 2023-02-22 235600.png

But I am still getting the following error:
Traceback (most recent call last):
  File "c:\Users\ADMIN\OneDrive\Projects\capstone_project\Download\Tutorials-2.5.2\Tutorials-2.5.2\B737_AVL_Tutorial\tut_mission_B737_AVL.py", line 740, in <module>
    main()    
  File "c:\Users\ADMIN\OneDrive\Projects\capstone_project\Download\Tutorials-2.5.2\Tutorials-2.5.2\B737_AVL_Tutorial\tut_mission_B737_AVL.py", line 34, in main
    analyses.finalize()
  File "C:\Users\ADMIN\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Analysis.py", line 271, in finalize
    analysis.finalize(*args,**kwarg)
  File "C:\Users\ADMIN\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Analysis.py", line 271, in finalize
    analysis.finalize(*args,**kwarg)
  File "C:\Users\ADMIN\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Analysis.py", line 271, in finalize
    analysis.finalize(*args,**kwarg)
  File "C:\Users\ADMIN\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Aerodynamics\AVL.py", line 148, in initialize
    self.process.compute.lift.inviscid.initialize(sv,cv,kf,srr,rf,po,ta,ssa,rrc,pra,lc)
  File "C:\Users\ADMIN\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Aerodynamics\AVL_Inviscid.py", line 149, in initialize
    self.sample_training()
  File "C:\Users\ADMIN\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Aerodynamics\AVL_Inviscid.py", line 285, in sample_training
    results =  self.evaluate_conditions(run_conditions, trim_aircraft)
  File "C:\Users\ADMIN\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Analyses\Aerodynamics\AVL_Inviscid.py", line 469, in evaluate_conditions
    results_avl = run_analysis(self,print_output)
  File "C:\Users\ADMIN\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Methods\Aerodynamics\AVL\run_analysis.py", line 40, in run_analysis
    call_avl(avl_object,print_output)
  File "C:\Users\ADMIN\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\suave-2.5.2-py3.9.egg\SUAVE\Methods\Aerodynamics\AVL\run_analysis.py", line 86, in call_avl
    avl_run = subprocess.Popen([avl_call,geometry],stdout=sys.stdout,stderr=sys.stderr,stdin=subprocess.PIPE)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1420, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
OSError: [WinError 193] %1 is not a valid Win32 application

Please help me with this error, if someone has any solution regarding this error.
And also please correct me if I did anything wrong.

I really appreciate any help you can provide.
Yash 

Emilio

unread,
Mar 15, 2023, 2:29:21 AM3/15/23
to SUAVE FORUM
Hi Yash,
The avl bin is not correct. You can download it from here.

-Emilio

Yash Thummar

unread,
Mar 17, 2023, 4:01:16 AM3/17/23
to SUAVE FORUM
Thank you Emilio for your reply.

I have tried many options and also changed avl files from the link you provided but still facing the same error.
Actually, I am using Windows 10 and I am not sure how to install AVL on my machine. Is there any specific command so I can check whether AVL is successfully installed in my machine and I can use it with python?

Thank you in advance
Yash 

Emilio

unread,
Apr 20, 2023, 11:32:43 PM4/20/23
to SUAVE FORUM
Sorry Yash! AVL is not our software package and I don't have a Windows machine to try myself and debug.

I hope someone else on the internet can chime in and help!

Yash Thummar

unread,
May 27, 2023, 11:36:57 AM5/27/23
to SUAVE FORUM
Hello Emilio, 

I know it's a late response. But I tried all the possible ways to run this tutorial in the meantime. And after some tries, I am receiving the following error:

C:\B737_AVL_Tutorial>C:/Users/ADMIN/AppData/Local/Programs/Python/Python36/python.exe c:/B737_AVL_Tutorial/tut_mission_B737_AVL.py

Traceback (most recent call last):
  File "c:/B737_AVL_Tutorial/tut_mission_B737_AVL.py", line 742, in <module>
    main()
  File "c:/B737_AVL_Tutorial/tut_mission_B737_AVL.py", line 34, in main
    analyses.finalize()
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.2-py3.6.egg\SUAVE\Analyses\Analysis.py", line 271, in finalize
    analysis.finalize(*args,**kwarg)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.2-py3.6.egg\SUAVE\Analyses\Analysis.py", line 271, in finalize
    analysis.finalize(*args,**kwarg)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.2-py3.6.egg\SUAVE\Analyses\Analysis.py", line 271, in finalize
    analysis.finalize(*args,**kwarg)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.2-py3.6.egg\SUAVE\Analyses\Aerodynamics\AVL.py", line 148, in initialize        
    self.process.compute.lift.inviscid.initialize(sv,cv,kf,srr,rf,po,ta,ssa,rrc,pra,lc)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.2-py3.6.egg\SUAVE\Analyses\Aerodynamics\AVL_Inviscid.py", line 149, in initialize
    self.sample_training()
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.2-py3.6.egg\SUAVE\Analyses\Aerodynamics\AVL_Inviscid.py", line 285, in sample_training
    results =  self.evaluate_conditions(run_conditions, trim_aircraft)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.2-py3.6.egg\SUAVE\Analyses\Aerodynamics\AVL_Inviscid.py", line 469, in evaluate_conditions
    results_avl = run_analysis(self,print_output)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.2-py3.6.egg\SUAVE\Methods\Aerodynamics\AVL\run_analysis.py", line 40, in run_analysis
    call_avl(avl_object,print_output)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python36\lib\site-packages\suave-2.5.2-py3.6.egg\SUAVE\Methods\Aerodynamics\AVL\run_analysis.py", line 86, in call_avl

    avl_run = subprocess.Popen([avl_call,geometry],stdout=sys.stdout,stderr=sys.stderr,stdin=subprocess.PIPE)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 997, in _execute_child
    startupinfo)
PermissionError: [WinError 5] Access is denied


Screenshot 2023-05-27 205347.png
I know it's still a Windows machine but I will be glad if you could confirm that I have added the right AVL bin file that I added in the script screenshot attached above.

Or anyone who can help me with this error who have face this error or anyone please let me know if anyone know this tutorial is able to run in windows machine.

Thank you in advance,
Yash 

Chang

unread,
May 27, 2023, 12:33:51 PM5/27/23
to SUAVE FORUM
Hi, Yash,

Personally, I think that the avl_bin_name should be "C:/avl3.36/avl.exe" in line 110 of "tut_mission_B737_AVL.py". Otherwise, you'll run into some path and file permission issues. Another solution is change the avl_call in line 86 of "suave-2.5.2-py3.6.egg\SUAVE\Methods\Aerodynamics\AVL\run_analysis.py" to your file path, it's shown as the following picture. Both methods work on my Windows machine. But the first way is better in my opinion, because there is no need to modify the SUAVE source file.

无标题.png

Good luck,
Chang

Yash Thummar

unread,
May 27, 2023, 1:38:35 PM5/27/23
to SUAVE FORUM
Thank you so much Chang. 

Your suggested first method is working for me. I have been trying to run this tutorial for the last 4 to 5 months. As I remembered I have also tried this solution and tried to use AVL version 4.0, and 3.6 also I tried Python 3.11.3(latest version), 3.9 and 3.6 but still, I was getting this type of Windows error. But the best part is today finally it works.

Again, thank you so much for your kind help,
Yash

Chang

unread,
May 27, 2023, 1:56:44 PM5/27/23
to SUAVE FORUM
You‘re welcome. Glad to see it works for you, too.

Chang

Reply all
Reply to author
Forward
0 new messages