Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Errno 2] No such file or directory: './data/kitti/kitti_merge/training/calib_cam2cam/000000.txt' #2

Open
870181985 opened this issue Nov 15, 2022 · 3 comments

Comments

@870181985
Copy link

I meet some troubles, can you give me some advice? thanks


100%|██████████| 33530/33530 [00:04<00:00, 7491.90it/s]
0%| | 0/33530 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/media/optobot-02/document/haosenWang/code/LPCG-master/link_kitti_raw.py", line 55, in
with open(calib_cam2cam_path, encoding='utf-8') as fw:
FileNotFoundError: [Errno 2] No such file or directory: './data/kitti/kitti_merge/training/calib_cam2cam/000000.txt'

Process finished with exit code 1


It seems that the path is wrong, but I tried to change the .Py file path to the data file path. It still doesn't work

@SPengLiang
Copy link
Owner

You can check the dir path (e.g., "./data/kitti/kitti_merge/training/calib_cam2cam", "./data/kitti/kitti_merge" and so on) to locate the path problem.

@Muyiyunzi
Copy link

Muyiyunzi commented Nov 19, 2022

I also met this error, this is a wrong use of os.symlink since the source path is relative to the linked path, so here's how I solved it:

  1. add lpcgdir = os.getcwd() at the beginning of 'link_kitti_raw.py'.
  2. revise the for-loop at line 39 to
os.symlink(os.path.join(lpcgdir, img_list[i][2:]), os.path.join(image_dst_dir, base_name+'.png'))
os.symlink(os.path.join(lpcgdir, lidar_list[i][2:]), os.path.join(lidar_dst_dir, base_name+'.bin'))
os.symlink(os.path.join(lpcgdir, cam2cam[i][3:]), os.path.join(cam2cam_dst_dir, base_name+'.txt'))
os.symlink(os.path.join(lpcgdir, vel2cam[i][3:]), os.path.join(vel2cam_dst_dir, base_name+'.txt'))

(adjust the tabs yourself)

@SPengLiang
Copy link
Owner

Thanks for your feedback! I will check and revise the code.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants