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

nugridse.se can not read mesa se output files from set1ext #46

Open
fherwig opened this issue Nov 23, 2017 · 2 comments
Open

nugridse.se can not read mesa se output files from set1ext #46

fherwig opened this issue Nov 23, 2017 · 2 comments
Assignees

Comments

@fherwig
Copy link
Member

fherwig commented Nov 23, 2017

these lines in executed in astrohub

from nugridpy import nugridse as mp
mseM2Z0p01=mp.se('/data/nugrid_apod2/data/set1ext/set1.1/see_wind/M2.00Z1.0e-02/M2.00Z0.010')

create this error in python 2:

Searching files, please wait.......
Sorry, there is no A vector. This can cause problems for reading abundances. Continue...
Sorry, there is no Z vector. This can cause problems for reading abundances. Continue... 
Sorry, there is no isomeric state vector. Continue...
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/nugridpy/h5T.py", line 1074, in run
    self.search_deep_sam()
  File "/usr/local/lib/python2.7/dist-packages/nugridpy/h5T.py", line 1315, in search_deep_sam
    self.h5 = mrT.File(self.filename,'r')
  File "/usr/local/lib/python2.7/dist-packages/h5py/_hl/files.py", line 266, in __init__
    name = filename_encode(name)
  File "/usr/local/lib/python2.7/dist-packages/h5py/_hl/compat.py", line 111, in filename_encode
    filename = fspath(filename)
  File "/usr/local/lib/python2.7/dist-packages/h5py/_hl/compat.py", line 42, in fspath
    + path_type.__name__)
TypeError: expected str, bytes or os.PathLike object, not newlist

Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/nugridpy/h5T.py", line 365, in run
    preprocTable=ascii_table(self.preprocName,self.filename)
  File "/usr/local/lib/python2.7/dist-packages/nugridpy/ascii_table.py", line 178, in __init__
    self.hattrs,self.data=self._readFile(sldir,filename,sep)
  File "/usr/local/lib/python2.7/dist-packages/nugridpy/ascii_table.py", line 307, in _readFile
    tmp.append(float(data[k][j]))
ValueError: could not convert string to float: None

There is a similar error in python 3.

@fherwig
Copy link
Member Author

fherwig commented Nov 23, 2017

I found that this issue now is true for mppnp output as well in python 2.

@fherwig
Copy link
Member Author

fherwig commented Nov 23, 2017

@jerichooconnell I add you just in case this has to do with some change you did fixing some "this runs not in python 3" issues ...

These are two different errors, one is python 2 error, which is also there for mppnp output. Then there is additional error that is only for python3 that is that it can not read mesa output files.

Try this in both python 2 and then python 3:

from nugridpy import nugridse as mp
mp.set_nugrid_path('/data/nugrid_apod2/')
a=mp.se(mass=15,Z=0.001)

We have not officially declared python 2 as abandoned. But I am thinking of doing it.

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

3 participants