DetZero icon indicating copy to clipboard operation
DetZero copied to clipboard

AttributeError: 'str' object has no attribute 'exists'

Open zyxcambridge opened this issue 2 years ago • 1 comments

023-10-19 06:32:41,967 INFO Total samples for Waymo dataset: 0 ---------------The waymo sample interval is 1, total sequecnes is 1----------------- 0%| | 0/1 [00:00<?, ?it/s] Traceback (most recent call last): File "/opt/conda/envs/detzero/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/opt/conda/envs/detzero/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/mnt/update/DetZero/detection/detzero_det/datasets/waymo/waymo_preprocess.py", line 241, in create_waymo_infos( File "/mnt/update/DetZero/detection/detzero_det/datasets/waymo/waymo_preprocess.py", line 90, in create_waymo_infos waymo_infos_val = get_infos_worker( File "/mnt/update/DetZero/detection/detzero_det/datasets/waymo/waymo_preprocess.py", line 36, in get_infos_worker sequence_infos = list(tqdm(executor.map(process_single_sequence, sample_sequence_file_list), File "/opt/conda/envs/detzero/lib/python3.8/site-packages/tqdm/std.py", line 1182, in iter for obj in iterable: File "/opt/conda/envs/detzero/lib/python3.8/concurrent/futures/_base.py", line 619, in result_iterator yield fs.pop().result() File "/opt/conda/envs/detzero/lib/python3.8/concurrent/futures/_base.py", line 444, in result return self.__get_result() File "/opt/conda/envs/detzero/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result raise self._exception File "/opt/conda/envs/detzero/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/mnt/update/DetZero/detection/detzero_det/datasets/waymo/waymo_utils.py", line 200, in process_single_sequence_and_save if pkl_file.exists(): AttributeError: 'str' object has no attribute 'exists'

zyxcambridge avatar Oct 19 '23 06:10 zyxcambridge

use os.path.exist() replace exist()

Winston-Lii avatar Oct 23 '23 08:10 Winston-Lii