-
Notifications
You must be signed in to change notification settings - Fork 14
Error when reading a line list
Hajime Kawahara edited this page Jul 19, 2021
·
6 revisions
The following error occurs when you try to read the linelist
EOFError Traceback (most recent call last)
~/anaconda3/lib/python3.8/site-packages/exojax-0.5.5-py3.8.egg/exojax/spec/exomolapi.py in read_states(statesf)
123 try:
--> 124 dat = pd.read_csv(statesf,compression="bz2",sep="\s+",usecols=range(4),names=("i","E","g","J"))
125 except:
This looks a download or save error. Remove your database and try again.
FileNotFoundError: [Errno 2] No such file or directory: '.database/H2O/1H2-16O/BT2/1H2-16O__BT2__03750-05625.trans.bz2'
This is a bit complicated. Some files in Exomol needs an exceptional treatment in exomolapi.py. Try the develop branch or we are welcome your PR that fixes the exception. Add line in exomolapi.py around these lines. The last one (1H2-16O__BT2) is a typical correction for this exception.
#SOME DEF FILES CONTAINS ERRORS. THESE ARE THE EXCEPTIONS
if deff.stem=="12C-16O2__UCL-4000":
ntransf=20
if deff.stem=="14N-1H3__CoYuTe":
maxnu=20000.0
if deff.stem=="1H2-16O__BT2":
ntransf=16
maxnu=30000.0
exception=True
numinf=np.array([0.0,250.0,500.,750.0,1000.,1500.0,2000, \
0,2250.,2750.,3500.,4500.,5500.,7000.,9000.,14000.,20000.])
numtag=make_numtag(numinf,maxnu)