Possible duplicate of #68 if that's using the same utility function?
I'm attempting to read the example Stott et al. 2004 Excel file and convert to LiPD. My python file (excel2lipd.py) is in a code directory, and the excel file is in a data directory on the same level:
import lipd
lipd.readExcel("../data/MD982176.Stott.2004.xls")
D = lipd.excel()
I get the output:
reading: MD982176.Stott.2004.xls
Found 1 Excel files
processing: MD982176.Stott.2004.xls
- Error: Variables are not entered correctly in sheet: paleo1measurement1
Unmatched variables: {'d18ob.rub', 'd18og.rub'}
Failed : MD982176.Stott.2004 [0]: No DOI key in publication
Traceback (most recent call last):
File "/project/code/excel2lipd.py", line 6, in <module>
D = lipd.excel()
File "/home/tom/.local/share/virtualenvs/code-ueoh45zC/lib/python3.8/site-packages/lipd/__init__.py", line 171, in excel
os.chdir(cwd)
FileNotFoundError: [Errno 2] No such file or directory: '../data'
If I run the same script but with the XLS in the same directory as the python file, I get a similar error:
reading: MD982176.Stott.2004.xls
Traceback (most recent call last):
File "/project/code/excel2lipd.py", line 5, in <module>
lipd.readExcel("MD982176.Stott.2004.xls")
File "/home/tom/.local/share/virtualenvs/code-ueoh45zC/lib/python3.8/site-packages/lipd/__init__.py", line 88, in readExcel
os.chdir(cwd)
FileNotFoundError: [Errno 2] No such file or directory: ''
...and no LiPD file created in either case. It also doesn't work with my own Excel template XLS.
Possible duplicate of #68 if that's using the same utility function?
I'm attempting to read the example Stott et al. 2004 Excel file and convert to LiPD. My python file (
excel2lipd.py
) is in acode
directory, and the excel file is in adata
directory on the same level:with the code
I get the output:
If I run the same script but with the XLS in the same directory as the python file, I get a similar error:
...and no LiPD file created in either case. It also doesn't work with my own Excel template XLS.