abuzarmahmood / blech_clust

GNU General Public License v3.0
7 stars 4 forks source link

Error with emg_filter.py: Hard coded file path? Commit e9a5857 #160

Closed natashakbt closed 1 month ago

natashakbt commented 1 month ago

Hello! Ran into an error with emg_filter.py. Looks like the code might be looking for a hard coded file path? Message below:

Traceback (most recent call last):
  File "emg_filter.py", line 20, in <module>
    metadata_handler = imp_metadata([[],dir_name])
  File "/home/natasha/Desktop/blech_clust/emg/../utils/blech_utils.py", line 28, in __init__
    self.get_file_list()
  File "/home/natasha/Desktop/blech_clust/emg/../utils/blech_utils.py", line 44, in get_file_list
    self.file_list = os.listdir(self.dir_name)
FileNotFoundError: [Errno 2] No such file or directory: '/media/bigdata/NM43_2500ms_160515_104159_copy/'
abuzarmahmood commented 1 month ago

Yes, you are right! Apologies!

Please replace lines 18-20 in emg_filter (copied below) with the code block after

# metadata_handler = imp_metadata(sys.argv)
dir_name = '/media/bigdata/NM43_2500ms_160515_104159_copy' 
metadata_handler = imp_metadata([[],dir_name])
metadata_handler = imp_metadata(sys.argv)
natashakbt commented 1 month ago

That fixed the issue, thank you!

abuzarmahmood commented 1 month ago

For reference, this issue was related to commit e9a5857