LernerLab / GuPPy

Guided Photometry Analysis in Python, a free and open-source FP analysis tool.
GNU General Public License v3.0
63 stars 11 forks source link

Error with computing PSTH #11

Closed Junes94 closed 2 years ago

Junes94 commented 2 years ago

Hi, I'm struggling with the error when computing PSTH (I use windows 10 pro). It seems successfully reading Raw Data, and extracting timestamps. However, when I clicked a PSTH computation button, anaconda prompt showed the error below.


Reading raw data...

C:\Users\MyPC\Desktop\실험실\2.실험데이터\StartReact\SAF-MDM2\Reaching\220207\m14\220207_m14s1

Reading tsq file....

No tsq file found. Trying to read data for TTL1 from csv file. Reading data for TTL1 from csv file is completed. Trying to read data for m14s1 from csv file. Reading data for m14s1 from csv file is completed. Time taken = 0.94547 Raw data fetched and saved. Extracting signal data and event timestamps... Remove Artifacts : False Combine Data : False Isosbestic Control Channel : False Correcting timestamps by getting rid of the first 1 seconds and convert timestamps to seconds... Timestamps corrected and converted to seconds. Applying correction of timestamps to the data and event timestamps... Timestamps corrections applied to the data and event timestamps. Applying correction of timestamps to the data and event timestamps... Timestamps corrections applied to the data and event timestamps. Applying correction of timestamps to the data and event timestamps... Timestamps corrections applied to the data and event timestamps. Creating control channel from signal channel using curve-fitting Control channel from signal channel created using curve-fitting Computing z-score for each of the data... Remove Artifacts : False z-score for the data computed. Signal data and event timestamps are extracted. Computing PSTH, Peak and Area for each event... Average for group : False Computing PSTH for event Turntable... multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "C:\Users\MyPC\anaconda3\envs\guppy\lib\multiprocessing\pool.py", line 125, in worker result = (True, func(*args, kwds)) File "C:\Users\MyPC\anaconda3\envs\guppy\lib\multiprocessing\pool.py", line 51, in starmapstar return list(itertools.starmap(args[0], args[1])) File "C:\Users\MyPC\Desktop\실험실\2.실험데이터\GuPPy-main\GuPPy\computePsth.py", line 328, in storenamePsth createDf(filepath, event+''+name_1+'_baselineUncorrected', basename, psth_baselineUncorrected, columns=cols) # extra File "C:\Users\MyPC\Desktop\실험실\2.실험데이터\GuPPy-main\GuPPy\computePsth.py", line 122, in create_Df df.to_hdf(op, key='df', mode='w') File "C:\Users\MyPC\anaconda3\envs\guppy\lib\site-packages\pandas\core\generic.py", line 2434, in to_hdf pytables.to_hdf( File "C:\Users\MyPC\anaconda3\envs\guppy\lib\site-packages\pandas\io\pytables.py", line 267, in to_hdf with HDFStore( File "C:\Users\MyPC\anaconda3\envs\guppy\lib\site-packages\pandas\io\pytables.py", line 553, in init self.open(mode=mode, kwargs) File "C:\Users\MyPC\anaconda3\envs\guppy\lib\site-packages\pandas\io\pytables.py", line 697, in open self._handle = tables.open_file(self._path, self._mode, kwargs) File "C:\Users\MyPC\anaconda3\envs\guppy\lib\site-packages\tables\file.py", line 315, in open_file return File(filename, mode, title, root_uep, filters, kwargs) File "C:\Users\MyPC\anaconda3\envs\guppy\lib\site-packages\tables\file.py", line 778, in init self._g_new(filename, mode, **params) File "tables/hdf5extension.pyx", line 492, in tables.hdf5extension.File._g_new tables.exceptions.HDF5ExtError: HDF5 error back trace

File "C:\ci\hdf5_1545244154871\work\src\H5F.c", line 444, in H5Fcreate unable to create file File "C:\ci\hdf5_1545244154871\work\src\H5Fint.c", line 1364, in H5F__create unable to open file File "C:\ci\hdf5_1545244154871\work\src\H5Fint.c", line 1557, in H5F_open unable to open file: time = Thu Feb 10 12:50:55 2022 , name = 'C:\Users\MyPC\Desktop\실험실\2.실험데이터\StartReact\SAF-MDM2\Reaching\220207\m14\220207_m14s1\220207_m14s1_output_1\Turntable_MD_baselineUncorrected_z_score_MD.h5', tent_flags = 13 File "C:\ci\hdf5_1545244154871\work\src\H5FD.c", line 734, in H5FD_open open failed File "C:\ci\hdf5_1545244154871\work\src\H5FDsec2.c", line 346, in H5FD_sec2_open unable to open file: name = 'C:\Users\MyPC\Desktop\실험실\2.실험데이터\StartReact\SAF-MDM2\Reaching\220207\m14\220207_m14s1\220207_m14s1_output_1\Turntable_MD_baselineUncorrected_z_score_MD.h5', errno = -1, error message = 'Unknown error', flags = 13, o_flags = 302

End of HDF5 error back trace

Unable to open/create file 'C:\Users\MyPC\Desktop\실험실\2.실험데이터\StartReact\SAF-MDM2\Reaching\220207\m14\220207_m14s1\220207_m14s1_output_1\Turntable_MD_baselineUncorrected_z_score_MD.h5' """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "computePsth.py", line 629, in psthForEachStorename(sys.argv[1:][0]) File "computePsth.py", line 616, in psthForEachStorename p.starmap(storenamePsth, zip(repeat(filepath), storesList[1,:], repeat(inputParameters))) File "C:\Users\MyPC\anaconda3\envs\guppy\lib\multiprocessing\pool.py", line 372, in starmap return self._map_async(func, iterable, starmapstar, chunksize).get() File "C:\Users\MyPC\anaconda3\envs\guppy\lib\multiprocessing\pool.py", line 771, in get raise self._value tables.exceptions.HDF5ExtError: HDF5 error back trace

File "C:\ci\hdf5_1545244154871\work\src\H5F.c", line 444, in H5Fcreate unable to create file File "C:\ci\hdf5_1545244154871\work\src\H5Fint.c", line 1364, in H5F__create unable to open file File "C:\ci\hdf5_1545244154871\work\src\H5Fint.c", line 1557, in H5F_open unable to open file: time = Thu Feb 10 12:50:55 2022 , name = 'C:\Users\MyPC\Desktop\실험실\2.실험데이터\StartReact\SAF-MDM2\Reaching\220207\m14\220207_m14s1\220207_m14s1_output_1\Turntable_MD_baselineUncorrected_z_score_MD.h5', tent_flags = 13 File "C:\ci\hdf5_1545244154871\work\src\H5FD.c", line 734, in H5FD_open open failed File "C:\ci\hdf5_1545244154871\work\src\H5FDsec2.c", line 346, in H5FD_sec2_open unable to open file: name = 'C:\Users\MyPC\Desktop\실험실\2.실험데이터\StartReact\SAF-MDM2\Reaching\220207\m14\220207_m14s1\220207_m14s1_output_1\Turntable_MD_baselineUncorrected_z_score_MD.h5', errno = -1, error message = 'Unknown error', flags = 13, o_flags = 302

End of HDF5 error back trace

Unable to open/create file 'C:\Users\MyPC\Desktop\실험실\2.실험데이터\StartReact\SAF-MDM2\Reaching\220207\m14\220207_m14s1\220207_m14s1_output_1\Turntable_MD_baselineUncorrected_z_score_MD.h5' Finding transients in z-score data and calculating frequency and amplitude.... calculating frequency and amplitude of transients in z-score data.... Creating chunks for multiprocessing... Chunks are created for multiprocessing. Traceback (most recent call last): File "findTransientsFreqAndAmp.py", line 314, in executeFindFreqAndAmp(sys.argv[1:][0]) File "findTransientsFreqAndAmp.py", line 307, in executeFindFreqAndAmp findFreqAndAmp(filepath, inputParameters, window=moving_window) File "findTransientsFreqAndAmp.py", line 184, in findFreqAndAmp create_Df(filepath, arr, basename, index=fileName ,columns=['freq (events/min)', 'amplitude']) File "findTransientsFreqAndAmp.py", line 127, in create_Df df.to_hdf(op, key='df', mode='w') File "C:\Users\MyPC\anaconda3\envs\guppy\lib\site-packages\pandas\core\generic.py", line 2434, in to_hdf pytables.to_hdf( File "C:\Users\MyPC\anaconda3\envs\guppy\lib\site-packages\pandas\io\pytables.py", line 267, in to_hdf with HDFStore( File "C:\Users\MyPC\anaconda3\envs\guppy\lib\site-packages\pandas\io\pytables.py", line 553, in init self.open(mode=mode, kwargs) File "C:\Users\MyPC\anaconda3\envs\guppy\lib\site-packages\pandas\io\pytables.py", line 697, in open self._handle = tables.open_file(self._path, self._mode, kwargs) File "C:\Users\MyPC\anaconda3\envs\guppy\lib\site-packages\tables\file.py", line 315, in open_file return File(filename, mode, title, root_uep, filters, kwargs) File "C:\Users\MyPC\anaconda3\envs\guppy\lib\site-packages\tables\file.py", line 778, in init self._g_new(filename, mode, params) File "tables/hdf5extension.pyx", line 492, in tables.hdf5extension.File._g_new tables.exceptions.HDF5ExtError: HDF5 error back trace

File "C:\ci\hdf5_1545244154871\work\src\H5F.c", line 444, in H5Fcreate unable to create file File "C:\ci\hdf5_1545244154871\work\src\H5Fint.c", line 1364, in H5F__create unable to open file File "C:\ci\hdf5_1545244154871\work\src\H5Fint.c", line 1557, in H5F_open unable to open file: time = Thu Feb 10 12:50:59 2022 , name = 'C:\Users\MyPC\Desktop\실험실\2.실험데이터\StartReact\SAF-MDM2\Reaching\220207\m14\220207_m14s1\220207_m14s1_output_1\freqAndAmp_z_score_MD.h5', tent_flags = 13 File "C:\ci\hdf5_1545244154871\work\src\H5FD.c", line 734, in H5FD_open open failed File "C:\ci\hdf5_1545244154871\work\src\H5FDsec2.c", line 346, in H5FD_sec2_open unable to open file: name = 'C:\Users\MyPC\Desktop\실험실\2.실험데이터\StartReact\SAF-MDM2\Reaching\220207\m14\220207_m14s1\220207_m14s1_output_1\freqAndAmp_z_score_MD.h5', errno = -1, error message = 'Unknown error', flags = 13, o_flags = 302

End of HDF5 error back trace

Unable to open/create file 'C:\Users\MyPC\Desktop\실험실\2.실험데이터\StartReact\SAF-MDM2\Reaching\220207\m14\220207_m14s1\220207_m14s1_output_1\freqAndAmp_z_score_MD.h5'


It would be pleasure if there's any support.

Thank you, June

Junes94 commented 2 years ago

I fixed it by moving the folder I wanted to analyze into another folder named only ENGLISH. I think some of the function didn't work with the language I used.

The program you made is very helpful. Thank you! June