You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used this pipeline a year ago and got it working nicely in the end. However, when trying to analyze new data now using the IMC preprocessing script, I encounter the following error:
BadZipFile Traceback (most recent call last)
Cell In[20], line 10
8 temp_dirs.append(temp_dir)
9 for zip_file in sorted(zip_files):
---> 10 imcsegpipe.extract_zip_file(zip_file, temp_dir.name)
11 acquisition_metadatas = []
12 for raw_dir in raw_dirs + [Path(temp_dir.name) for temp_dir in temp_dirs]:
File ~/ImcSegmentationPipeline/src/imcsegpipe/_imcsegpipe.py:23, in extract_zip_file(zip_file, dest_dir)
20 def extract_zip_file(
21 zip_file: Union[str, PathLike], dest_dir: Union[str, PathLike]
22 ) -> None:
---> 23 with ZipFile(zip_file, allowZip64=True) as f:
24 f.extractall(dest_dir)
File ~/miniconda3/envs/imcsegpipe/lib/python3.9/zipfile.py:1266, in ZipFile.init(self, file, mode, compression, allowZip64, compresslevel, strict_timestamps)
1264 try:
1265 if mode == 'r':
-> 1266 self._RealGetContents()
1267 elif mode in ('w', 'x'):
1268 # set the modified flag so central directory gets written
1269 # even if no files are added to the archive
1270 self._didModify = True
File ~/miniconda3/envs/imcsegpipe/lib/python3.9/zipfile.py:1333, in ZipFile._RealGetContents(self)
1331 raise BadZipFile("File is not a zip file")
1332 if not endrec:
-> 1333 raise BadZipFile("File is not a zip file")
1334 if self.debug > 1:
1335 print(endrec)
BadZipFile: File is not a zip file
I ran the analysis using MacOS Sonoma as well as Linux/Ubuntu.
I compressed mcd+txt files using both above-mentioned systems with default compression but also using a third party tool on mac.
I updated conda, deleted the IMCsegmentationPipeline repository and cloned it again.
When I used the script to preprocess data from one year ago or your example data, everything worked nicely. However when I extracted your example data and zipped it again, the same error as above occurred.
None of the above worked - the same error persisted.
From the above I suspect that the error might be due to an old version of the imcsegpipe. When I tried to update the imcsegpipe python package using
pip install imcsegpipe --upgrade
, the following error was reported:
ERROR: Could not find a version that satisfies the requirement imcsegpipe (from versions: none)
ERROR: No matching distribution found for imcsegpipe
What could be the problem here?
Thank you in advance!
The text was updated successfully, but these errors were encountered:
Apparently, the fact that the .zip files were located on a ExFAT-formatted external SSD drive caused the problem...
Relocating them to the internal HD drive of the M3 Mac book solved the issue.
Hi,
I used this pipeline a year ago and got it working nicely in the end. However, when trying to analyze new data now using the IMC preprocessing script, I encounter the following error:
BadZipFile Traceback (most recent call last)
Cell In[20], line 10
8 temp_dirs.append(temp_dir)
9 for zip_file in sorted(zip_files):
---> 10 imcsegpipe.extract_zip_file(zip_file, temp_dir.name)
11 acquisition_metadatas = []
12 for raw_dir in raw_dirs + [Path(temp_dir.name) for temp_dir in temp_dirs]:
File ~/ImcSegmentationPipeline/src/imcsegpipe/_imcsegpipe.py:23, in extract_zip_file(zip_file, dest_dir)
20 def extract_zip_file(
21 zip_file: Union[str, PathLike], dest_dir: Union[str, PathLike]
22 ) -> None:
---> 23 with ZipFile(zip_file, allowZip64=True) as f:
24 f.extractall(dest_dir)
File ~/miniconda3/envs/imcsegpipe/lib/python3.9/zipfile.py:1266, in ZipFile.init(self, file, mode, compression, allowZip64, compresslevel, strict_timestamps)
1264 try:
1265 if mode == 'r':
-> 1266 self._RealGetContents()
1267 elif mode in ('w', 'x'):
1268 # set the modified flag so central directory gets written
1269 # even if no files are added to the archive
1270 self._didModify = True
File ~/miniconda3/envs/imcsegpipe/lib/python3.9/zipfile.py:1333, in ZipFile._RealGetContents(self)
1331 raise BadZipFile("File is not a zip file")
1332 if not endrec:
-> 1333 raise BadZipFile("File is not a zip file")
1334 if self.debug > 1:
1335 print(endrec)
BadZipFile: File is not a zip file
I ran the analysis using MacOS Sonoma as well as Linux/Ubuntu.
I compressed mcd+txt files using both above-mentioned systems with default compression but also using a third party tool on mac.
I updated conda, deleted the IMCsegmentationPipeline repository and cloned it again.
When I used the script to preprocess data from one year ago or your example data, everything worked nicely. However when I extracted your example data and zipped it again, the same error as above occurred.
None of the above worked - the same error persisted.
From the above I suspect that the error might be due to an old version of the imcsegpipe. When I tried to update the imcsegpipe python package using
pip install imcsegpipe --upgrade
, the following error was reported:
ERROR: Could not find a version that satisfies the requirement imcsegpipe (from versions: none)
ERROR: No matching distribution found for imcsegpipe
What could be the problem here?
Thank you in advance!
The text was updated successfully, but these errors were encountered: