Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

IndexError: list index out of range #3

Open
Timaces opened this issue Dec 6, 2019 · 4 comments
Open

IndexError: list index out of range #3

Timaces opened this issue Dec 6, 2019 · 4 comments

Comments

@Timaces
Copy link

Timaces commented Dec 6, 2019

hi,thank you for your work.
when I run the code : python main.py, there is a problem:
Give me the class name (e.g. "chair"): chair
Traceback (most recent call last):
File "main.py", line 39, in
all_pc_data = load_all_point_clouds_under_folder(class_dir, n_threads=8, file_ending='.ply', verbose=True)
File "/home/omnisky/Desktop/GraphCNN-GAN-master/gconv_up_aggr_code/in_out.py", line 115, in load_all_point_clouds_under_folder
pclouds, model_ids, syn_ids = load_point_clouds_from_filenames(file_names, n_threads, loader=pc_loader, verbose=verbose)
File "/home/omnisky/Desktop/GraphCNN-GAN-master/gconv_up_aggr_code/in_out.py", line 120, in load_point_clouds_from_filenames
pc = loader(file_names[0])[0]
IndexError: list index out of range

Could you help me ? thank you very much.

@diegovalsesia
Copy link
Owner

Make sure you have downloaded the training data. They are the same used in https://github.com/optas/latent_3d_points and need to be placed under a data/ subdirectory

@Timaces
Copy link
Author

Timaces commented Dec 6, 2019

Make sure you have downloaded the training data. They are the same used in https://github.com/optas/latent_3d_points and need to be placed under a data/ subdirectory

Hello, I have solved the problem. Can you tell me how you run this code? I run Python main.py directly and always report an error. I may not be as knowledgeable as you think.

@diegovalsesia
Copy link
Owner

Use the launcher scripts, they will provide all the input parameters. ./launcher_test.sh to test the model and ./launcher_train.sh to train it.
You may need to create an empty directory for the output point clouds. Create it under Results/gconv_up_aggr/table/renders

@Timaces
Copy link
Author

Timaces commented Dec 6, 2019

Use the launcher scripts, they will provide all the input parameters. ./launcher_test.sh to test the model and ./launcher_train.sh to train it.
You may need to create an empty directory for the output point clouds. Create it under Results/gconv_up_aggr/table/renders

If the code is under gconv_up_grcode in the file, the error indexerror: list index out of range will be reported, that is, the name of the data set cannot be read. I put the code on the same level directory of gconv_up_grcode, and the error will be gone, but it will appear:

File "main.py", line 61, in

shutil.rmtree(config.render_dir)

File "/usr/lib/python2.7/shutil.py", line 239, in rmtree

onerror(os.listdir, path, sys.exc_info())

File "/usr/lib/python2.7/shutil.py", line 237, in rmtree

names = os.listdir(path)

OSError: [Errno 2] No such file or directory: ''

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

No branches or pull requests

2 participants