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

Exception raised if /buffer_files/ doesn't exist. #1

Open
vstadnytskyi opened this issue Oct 16, 2019 · 0 comments
Open

Exception raised if /buffer_files/ doesn't exist. #1

vstadnytskyi opened this issue Oct 16, 2019 · 0 comments

Comments

@vstadnytskyi
Copy link
Owner

Exception raised if /buffer_files/ doesn't exist. The log file does exist. The error needs to be handled and at least log file history should be processed.

the code

from icarus_nmr.analysis import Dataset 
datasets = {}
for tube in list(foldername_list.keys()):
    for foldername in foldername_list[tube]:
        a = Dataset(folder = root_data + foldername)
        datasets[tube].append(a)

and the exception is

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-18-7ce0b105d88e> in <module>
      2 for tube in list(foldername_list.keys()):
      3     for foldername in foldername_list[tube]:
----> 4         a = Dataset(folder = root_data + foldername)
      5 
      6         datasets[tube].append(a)

~/All-Projects-on-femto/NMR-Pressure-Jump/icarus-nmr/icarus_nmr/analysis.py in __init__(self, folder)
     47         self.i = 0
     48         if folder is not None:
---> 49             self.init()
     50 
     51     def init(self):

~/All-Projects-on-femto/NMR-Pressure-Jump/icarus-nmr/icarus_nmr/analysis.py in init(self)
     60             #get the list of all trace types and put in appropriate dictionary entry
     61             for key in self.trace_lists.keys():
---> 62                 self.trace_lists[key] = self.get_lst(self.folder, key)
     63                 self.trace_length[key] = len(self.trace_lists[key])
     64             #get log_header

~/All-Projects-on-femto/NMR-Pressure-Jump/icarus-nmr/icarus_nmr/analysis.py in get_lst(self, folder, type)
    188         from numpy import genfromtxt
    189         import os
--> 190         dir_lst = os.listdir(folder + "buffer_files/")
    191         temp_lst = []
    192         for item in dir_lst:

FileNotFoundError: [Errno 2] No such file or directory: '/net/femto-data/C/Pressure-Jump-NMR/icarus-ii-50/2019-09-30-10-52-36/buffer_files/'
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

1 participant