I am trying to open a file that exists using python, and opens perfectly if I open it using gedit in command line.
However, I get the following error message:
andreas@ubuntu:~/Desktop/Thesis/Codes/ModifiedFiles$ python vis.py -f myoutputcsv.csv
Matplotlib version 1.3.1
Traceback (most recent call last):
File "vis.py", line 1082, in <module>
reliability_table = ReliabilityTable(reliability_table_file)
File "vis.py", line 112, in __init__
self.read(filename)
File "vis.py", line 139, in read
self.data = genfromtxt(filename, delimiter=',',comments='#', dtype=float)
File "/usr/lib/python2.7/dist-packages/numpy/lib/npyio.py", line 1344, in genfromtxt
fhd = iter(np.lib._datasource.open(fname, 'rbU'))
File "/usr/lib/python2.7/dist-packages/numpy/lib/_datasource.py", line 147, in open
return ds.open(path, mode)
File "/usr/lib/python2.7/dist-packages/numpy/lib/_datasource.py", line 496, in open
raise IOError("%s not found." % path)
IOError: ~/Desktop/Thesis/Codes/ModifiedFiles/reliability_table_2.csv not found.
Do you know what I may be doing wrong? I have very little experience with python and I cannot find the reason the file opens at command line but not using python.
myoutputcsv.csvwhile the error saysreliability_table_2.csv. Have you maybe hardcoded the wrong name in yourvis.py? What are the contents ofvis.pyanyway?