Closed ijsalamon closed 4 years ago
Hello Ian,
Your first error is likely because you are running Test3.py in a directory where aeropy is not installed. If you are going to do that, you should define a PYTHONPATH to the AeroPy directory to solve this issue.
As for the second error, independently of where you run your code, you need a copy of xfoil.exe in that directory. Subprocess is trying to run the file, but it cannot find it.
Let me know if you need more help.
Pedro
I'm using pycharm right now and I have the directory linked to the project folder so it does detect some directories but I can't import all of them. Also does x-foil come with the AreoPy because I thought it did, I haven't moved anything yet but I did run another x-foil program separately from the one in the AeroPy folder.
Could you be more specific about which directories it cannot import? Try running an example on the AeroPy directory to see what happens.
AeroPy already comes with the xfoil.exe file.
Hi,
I am trying to work with your code but am having some problems, first when I try running the example code on the site I get the error `C:\Python27\python.exe C:/Users/Ian/Documents/Python/Aero/Test3.py Traceback (most recent call last): File "C:/Users/Ian/Documents/Python/Aero/Test3.py", line 1, in
from AeroPy import find_pressure_coefficients
ImportError: cannot import name find_pressure_coefficients
Process finished with exit code 1`
So I try one of the other modules I want to use and I get another error
`C:\Python27\python.exe C:/Users/Ian/Documents/Python/Aero/Test3.py <type 'float'> Traceback (most recent call last): File "C:/Users/Ian/Documents/Python/Aero/Test3.py", line 3, in
find_pressure_coefficients(airfoil='naca0012', Reynolds = 1e6, alpha=12.,NACA=True)
File "C:\Users\Ian\Downloads\Installers\AeroPy\xfoil_module.py", line 854, in find_pressure_coefficients
NACA=NACA, PANE=PANE)
File "C:\Users\Ian\Downloads\Installers\AeroPy\xfoil_module.py", line 207, in call
startupinfo = startupinfo)
File "C:\Python27\lib\subprocess.py", line 390, in init
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 640, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
Process finished with exit code 1`
I don't know if I'm being stupid or if this need actual help, I'm moderate at python so don't ask for too much from me :)
Thanks,
Ian