diff --git a/instruments/readers/g5505_text_reader.py b/instruments/readers/g5505_text_reader.py index 62c558c..d127202 100644 --- a/instruments/readers/g5505_text_reader.py +++ b/instruments/readers/g5505_text_reader.py @@ -17,12 +17,11 @@ def read_txt_files_as_dict(filename: str, instruments_dir: str = None, work_with # If instruments_dir is not provided, use the default path relative to the module directory if not instruments_dir: # Assuming the instruments folder is one level up from the source module directory - #module_dir = os.path.dirname(__file__) - #instruments_dir = os.path.join(module_dir, '..', 'instruments') - instruments_dir = os.path.join(root_dir,'instruments') + module_dir = os.path.dirname(__file__) + instruments_dir = os.path.join(module_dir, '..') # Normalize the path (resolves any '..' in the path) - instrument_configs_path = os.path.abspath(os.path.join(instruments_dir,'readers/config_text_reader.yaml')) + instrument_configs_path = os.path.abspath(os.path.join(instruments_dir,'readers','config_text_reader.yaml')) with open(instrument_configs_path,'r') as stream: try: