Creation of npz dataset file fails
Closed this issue · 2 comments
Describe the bug
When I try to create the npz file dataset I get the following error:
Traceback (most recent call last):
File "/opt/anaconda3/envs/cellpose/bin/deepblink", line 8, in <module>
sys.exit(main())
File "/opt/anaconda3/envs/cellpose/lib/python3.7/site-packages/deepblink/cli/_main.py", line 99, in main
handler()
File "/opt/anaconda3/envs/cellpose/lib/python3.7/site-packages/deepblink/cli/_create.py", line 58, in __call__
self.get_file_lists()
File "/opt/anaconda3/envs/cellpose/lib/python3.7/site-packages/deepblink/cli/_create.py", line 229, in get_file_lists
for image, label in zip(*self.image_label_lists):
File "/opt/anaconda3/envs/cellpose/lib/python3.7/site-packages/deepblink/cli/_create.py", line 126, in image_label_lists
df = pd.read_csv(label, index_col=0)
File "/opt/anaconda3/envs/cellpose/lib/python3.7/site-packages/pandas/io/parsers.py", line 605, in read_csv
return _read(filepath_or_buffer, kwds)
File "/opt/anaconda3/envs/cellpose/lib/python3.7/site-packages/pandas/io/parsers.py", line 457, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "/opt/anaconda3/envs/cellpose/lib/python3.7/site-packages/pandas/io/parsers.py", line 814, in __init__
self._engine = self._make_engine(self.engine)
File "/opt/anaconda3/envs/cellpose/lib/python3.7/site-packages/pandas/io/parsers.py", line 1045, in _make_engine
return mapping[engine](self.f, **self.options) # type: ignore[call-arg]
File "/opt/anaconda3/envs/cellpose/lib/python3.7/site-packages/pandas/io/parsers.py", line 1893, in __init__
self._reader = parsers.TextReader(self.handles.handle, **kwds)
File "pandas/_libs/parsers.pyx", line 521, in pandas._libs.parsers.TextReader.__cinit__
pandas.errors.EmptyDataError: No columns to parse from file
To Reproduce
I use the following command for the creation of the npz file:
deepblink create -i path_to_folder -l path_to_folder -n test_dataset
Expected behavior
As shown in the tutorial and described in the documentation I would expect an npz file to be created in the specified directory.
Versions:
python version : 3.7.4.final.0
platform : osx-64
deepblink 0.1.1 pypi_0 pypi
pandas 1.2.1 pypi_0 pypi
Thank you very much for your help!
Micha
Hey. Thanks for submitting the issue and sorry for taking a while to respond. We get an pandas.errors.EmptyDataError
which suggests that one of the labels (coordinates.csv
) file is empty, i.e. without a label. Is that possible?
I realise we don't have any error message documenting that empty files aren't possible and will try to add it in the next release.
Hi,
That's indeed the case!
When I remove the empty label csv files from the directory it works.
Thanks a lot for your help!