leal26 / AeroPy

Python interface for XFOIL. The objective of this library is to be able to be able to call XFOIL from Python iteratively for any simulation in a total of 4 lines total.
MIT License
60 stars 31 forks source link

subprocess issue #13

Open benoitpaillard opened 5 years ago

benoitpaillard commented 5 years ago

Hi all,

I'm getting the crash

AttributeError: module 'subprocess' has no attribute 'STARTUPINFO'

when running

find_coefficients(airfoil='naca0012',alpha=12.)

Any idea ? Thanks !

leal26 commented 5 years ago

Based on a quick Google search, I found the reason here. STARTUPINFO is only available in Windows. If you are using Linux OS, comment that line and rerun it.

Hopefully, it works

carlsondev commented 4 years ago

I've found the best way is to replace the ps declaration in xfoil_module.py to " ps = sp.Popen(['/path/to/xfoil'], stdin=sp.PIPE, stdout=sout, stderr=None, encoding='utf8')" if you are using macOS or Linux