Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run error on XPS 15 running Python 3.7.4 #38

Open
calmymail opened this issue Nov 25, 2019 · 0 comments
Open

Run error on XPS 15 running Python 3.7.4 #38

calmymail opened this issue Nov 25, 2019 · 0 comments

Comments

@calmymail
Copy link

Bought new laptop and when I tried to run a code, got runtime errors which never existed on my desktop. File is attached
TBMP.py.txt

TBM-Plot> python.exe .\TBMplts.py
Working on Mach Number: 1.5
Working on Mach Number: 2.0
Working on Mach Number: 2.5
Working on Mach Number: 3.0
Working on Mach Number: 3.5
Working on Mach Number: 4.0
Working on Mach Number: 4.5
Working on Mach Number: 5.0
Working on Mach Number: 5.5
Working on Mach Number: 6.0
Working on Mach Number: 6.5
Working on Mach Number: 7.0
Working on Mach Number: 8.0
Working on Mach Number: inf
Traceback (most recent call last):
File ".\TBMplts.py", line 84, in
plot_max_line(gamma=gamma, color='k', linestyle='--')
File ".\TBMplts.py", line 41, in plot_max_line
theta_max[i], beta_max[i] = shocks.max_deflection(M[i], gamma)
File "C:\Users\Charles\Google Drive\Teaching\Codes\Projects_CAL\TBM-Plot\skaero\gasdynamics\shocks.py", line 62, in max_deflection
eq, mu, np.pi / 2, args=(M_1, gamma), disp=0)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\scipy\optimize\optimize.py", line 1736, in fminbound
res = _minimize_scalar_bounded(func, (x1, x2), args, **options)
File "C:\Users\Charles\AppData\Local\Programs\Python\Python37\lib\site-packages\scipy\optimize\optimize.py", line 1870, in _minimize_scalar_bounded
if np.isnan(xf) or np.isnan(fx) or np.isnan(fu):
UnboundLocalError: local variable 'fu' referenced before assignment

Thoughts or suggestions would be appreciated.

Charles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant