-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
The following code snippet works fine in a terminal, but not a Jupyter notebook. Is there anything special about Jupyter that would prevent hissw from working properly?
>>> import hissw
>>> env = hissw.Environment(ssw_packages=['chianti'])
>>> script="""
... print,max_temp('Fe X')
... """
>>> env.run(script)
Error in Jupyter:
---------------------------------------------------------------------------
SSWIDLError Traceback (most recent call last)
Cell In[23], line 6
2 env = hissw.Environment(ssw_packages=['chianti'])
3 script="""
4 print,max_temp('Fe X')
5 """
----> 6 env.run(script)
File ~/anaconda3/lib/python3.11/site-packages/hissw/environment.py:185, in Environment.run(self, script, args, save_vars, verbose, **kwargs)
182 subprocess.call(['chmod', 'u+x', shell_filename])
183 cmd_output = subprocess.run([shell_filename], shell=True, stderr=subprocess.PIPE,
184 stdout=subprocess.PIPE)
--> 185 self._check_for_errors(cmd_output, verbose, **kwargs)
186 results = readsav(save_filename)
188 return results
File ~/anaconda3/lib/python3.11/site-packages/hissw/environment.py:200, in Environment._check_for_errors(self, output, verbose, **kwargs)
198 if kwargs.get('raise_exceptions', True):
199 if 'execution halted' in stderr.lower():
--> 200 raise SSWIDLError(stderr)
201 if 'failed to acquire license' in stderr.lower():
202 raise IDLLicenseError(stderr)
SSWIDLError: IDL 8.9.0 (darwin x86_64 m64).
(c) 2023, L3Harris Geospatial Solutions, Inc.
Licensed for use by: University of Hawaii (MAIN)
License: 828837
A new version is available: IDL 9.0
https://www.nv5geospatialsoftware.com/Product-Downloads/
% Program caused arithmetic error: Floating overflow
% Compiled module: USE_CHIANTI.
% Compiled module: DIR_EXIST.
% OPENR: Error opening file. Unit: 1
File: /Users/reep/ssw/packages/chianti/dbase/VERSION
No such file or directory
% Execution halted at: USE_CHIANTI 155
/Users/reep/ssw/packages/chianti/idl/setup/use_chianti.pro
% $MAIN$
% Compiled module: HISSW_PROCEDURE.
% Compiled module: MAX_TEMP.
% Compiled module: PICKFILE.
% Compiled module: READ_IONEQ.
The VERSION file it's failing to read does in fact exist:
(base) reep@atrcw9 dbase % more /Users/reep/ssw/packages/chianti/dbase/VERSION
8.0.7
A hello-world with hissw does work in Jupyter:
import hissw
env = hissw.Environment()
script = """
print,'hello world!'
"""
env.run(script)
so this leads me to suspect that CHIANTI is not being properly instantiated in a Jupyter notebook. Have you encountered this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels