space-physics / msise00

NRL MSISE-00 atmospheric model-- in Python and Matlab
https://ccmc.gsfc.nasa.gov/pub/modelweb/atmospheric/msis/
MIT License
47 stars 22 forks source link

RuntimeError: generator didn't stop after throw() #18

Closed dillon-gillespie closed 3 years ago

dillon-gillespie commented 3 years ago

Hello I'm currently working on a MacOS but this also occurred on my windows system.

Basically when i try to run Msise00.run it returns the following:

(base) Dillons-iMac:conductance dmgillespie$ python

Python 3.7.6 (default, Jan 8 2020, 13:42:34)

[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin

Type "help", "copyright", "credits" or "license" for more information.

import msise00

from datetime import datetime

atmos = msise00.run(time = datetime(2013,3,31,12),altkm = 150., glat = 65., glon = -148.)

Traceback (most recent call last):

File "/Users/dmgillespie/opt/anaconda3/lib/python3.7/importlib/resources.py", line 188, in path

yield Path(reader.resource_path(resource))

File "/Users/dmgillespie/opt/anaconda3/lib/python3.7/site-packages/msise00/base.py", line 130, in rungtd1d

cmake(setup_file)

File "/Users/dmgillespie/opt/anaconda3/lib/python3.7/site-packages/msise00/base.py", line 36, in cmake

subprocess.check_call([exe, "-S", str(setup_file), "-VV"])

File "/Users/dmgillespie/opt/anaconda3/lib/python3.7/subprocess.py", line 358, in check_call

retcode = call(*popenargs, **kwargs)

File "/Users/dmgillespie/opt/anaconda3/lib/python3.7/subprocess.py", line 339, in call

with Popen(*popenargs, **kwargs) as p:

File "/Users/dmgillespie/opt/anaconda3/lib/python3.7/subprocess.py", line 800, in init

restore_signals, start_new_session)

File "/Users/dmgillespie/opt/anaconda3/lib/python3.7/subprocess.py", line 1551, in _execute_child

raise child_exception_type(errno_num, err_msg, err_filename)

FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/ctest': '/usr/local/bin/ctest'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "", line 1, in

File "/Users/dmgillespie/opt/anaconda3/lib/python3.7/site-packages/msise00/base.py", line 53, in run

atmos = rungtd1d(time, altkm, glat.squeeze()[()], glon.squeeze()[()], indices)

File "/Users/dmgillespie/opt/anaconda3/lib/python3.7/site-packages/msise00/base.py", line 130, in rungtd1d

cmake(setup_file)

File "/Users/dmgillespie/opt/anaconda3/lib/python3.7/contextlib.py", line 161, in exit

raise RuntimeError("generator didn't stop after throw()")

RuntimeError: generator didn't stop after throw()

dillon-gillespie commented 3 years ago

Any advice would be greatly appreciated!

scivision commented 3 years ago

This issue is caused by CMake not being found

pip install cmake

I made msise00 v1.9.1 give a better error message for this. Thanks!

dillon-gillespie commented 3 years ago

Thank you so much Michael,

I should have closed this on Friday actually, Dogacan Ozturk helped me debug the problem but it was late in the afternoon so I forgot to close out my request.

I appreciate your feedback and will update msise00 to stay ahead of any past issues.

Best wishes, Dillon G.

On Sat, Feb 6, 2021, 10:49 PM Michael Hirsch notifications@github.com wrote:

Closed #18 https://github.com/space-physics/msise00/issues/18.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/space-physics/msise00/issues/18#event-4299940755, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALZ7DQZ3N2SNUUDZXR5JHZTS5ZAZNANCNFSM4XEMBLTQ .