Discussions
Erorr when using Minio storage
Please help me with this issue
Environment
- Ubuntu 22.04
- Fastdup ver 1.64
- Python 3.10
- and already installed minio client as the guide
When running these code:
"coco_csv = 'coco_minitrain_25k/coco_minitrain_25k/annotations/coco_minitrain2017_15images.csv'
coco_annotations = pd.read_csv(coco_csv, header=None, names=['filename', 'col_x', 'row_y',
'width', 'height', 'label', 'ext'])
work_dir = 'fastdup_coco_25k'
fd = fastdup.create(work_dir, 'minio://myminio/fastapi-minio/Fastdup_Input')
fd.run(annotations=coco_annotations)"
The error shows as below
"Traceback (most recent call last):
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/fastdup/sentry.py", line 132, in inner_function
ret = func(_args, kwargs)
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/fastdup/fastdup_controller.py", line 581, in run
if fastdup.run(self._set_fastdup_input(), work_dir=str(self._work_dir), fastdup_kwargs) != 0:
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/fastdup/fastdup_controller.py", line 853, in _set_fastdup_input
df_annot['filename'] = df_annot[FD.ANNOT_FILENAME].apply(lambda fname: self._input_dir / fname)
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/pandas/core/series.py", line 4760, in apply
).apply()
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/pandas/core/apply.py", line 1207, in apply
return self.apply_standard()
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/pandas/core/apply.py", line 1287, in apply_standard
mapped = obj._map_values(
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/pandas/core/base.py", line 921, in _map_values
return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/pandas/core/algorithms.py", line 1814, in map_array
return lib.map_infer(values, mapper, convert=convert)
File "lib.pyx", line 2917, in pandas._libs.lib.map_infer
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/fastdup/fastdup_controller.py", line 853, in
df_annot['filename'] = df_annot[FD.ANNOT_FILENAME].apply(lambda fname: self._input_dir / fname)
TypeError: unsupported operand type(s) for /: 'str' and 'str'
Traceback (most recent call last):
File "/home/anntt/Documents/AI_Testing/Fastdup_Mislabel.py", line 19, in
fd.run(annotations=coco_annotations)
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/fastdup/engine.py", line 157, in run
return super().run(annotations=annotations, input_dir=input_dir, subset=subset, data_type=data_type,
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/fastdup/sentry.py", line 138, in inner_function
raise ex
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/fastdup/sentry.py", line 132, in inner_function
ret = func(_args, kwargs)
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/fastdup/fastdup_controller.py", line 581, in run
if fastdup.run(self._set_fastdup_input(), work_dir=str(self._work_dir), fastdup_kwargs) != 0:
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/fastdup/fastdup_controller.py", line 853, in _set_fastdup_input
df_annot['filename'] = df_annot[FD.ANNOT_FILENAME].apply(lambda fname: self._input_dir / fname)
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/pandas/core/series.py", line 4760, in apply
).apply()
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/pandas/core/apply.py", line 1207, in apply
return self.apply_standard()
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/pandas/core/apply.py", line 1287, in apply_standard
mapped = obj._map_values(
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/pandas/core/base.py", line 921, in _map_values
return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert)
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/pandas/core/algorithms.py", line 1814, in map_array
return lib.map_infer(values, mapper, convert=convert)
File "lib.pyx", line 2917, in pandas._libs.lib.map_infer
File "/home/anntt/Documents/AI_Testing/dockerExample/FastAPIExample/mainenv/lib/python3.10/site-packages/fastdup/fastdup_controller.py", line 853, in
df_annot['filename'] = df_annot[FD.ANNOT_FILENAME].apply(lambda fname: self._input_dir / fname)
TypeError: unsupported operand type(s) for /: 'str' and 'str'"
Please help me check this issue.
Thanks and Best regards