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

ValueError: '000000' is not in list #1108

Open
prrw opened this issue Jun 5, 2024 · 5 comments
Open

ValueError: '000000' is not in list #1108

prrw opened this issue Jun 5, 2024 · 5 comments
Labels
first answer provided question Question, not yet a bug ;)

Comments

@prrw
Copy link

prrw commented Jun 5, 2024

Describe the issue

@cornerfarmer

The BopWriter fails during calc_mask_info_coco. I am using blenderproc==2.7.0 under Windows with python==3.8.10.
I am getting the following error when I run the camera_object_pose example:

blenderproc run examples/basics/camera_object_pose/main.py examples/basics/camera_object_pose/obj_000004.ply examples/basics/camera_object_pose/output

Error:

c:\data\git\demonstrator-data-generation\.env\lib\site-packages\blenderproc\python\writer\BopWriterUtility.py:130: UserWarning: WARNING: `m2mm` is deprecated, please use `annotation_scale='mm'` instead!
  warnings.warn("WARNING: `m2mm` is deprecated, please use `annotation_scale='mm'` instead!")
Error: Python: Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Data\Git\demonstrator-data-generation\../BlenderProc/examples/basics/camera_object_pose/main.py", line 61, in <module>
    bproc.writer.write_bop(args.output_dir, [obj], data["depth"], data["colors"], m2mm=True, append_to_existing_output=True)
  File "c:\data\git\demonstrator-data-generation\.env\lib\site-packages\blenderproc\python\writer\BopWriterUtility.py", line 149, in write_bop
    chunk_dirs = chunk_dirs[chunk_dir_ids.index(f"{starting_chunk_id:06d}"):]
ValueError: '000000' is not in list

Error: script failed, file: '../BlenderProc/examples/basics/camera_object_pose/main.py', exiting.
Cleaning temporary directory

Minimal code example

No response

Files required to run the code

No response

Expected behavior

The example is not updated with blenderproc version 2.7.0. However, the example should run without throwing error.

BlenderProc version

v2.7.0

@prrw prrw added the question Question, not yet a bug ;) label Jun 5, 2024
@cornerfarmer
Copy link
Member

Hey @prrw,

I cannot reproduce this error. Maybe clean the output dir examples/basics/camera_object_pose/output and see if that helps.

@prrw
Copy link
Author

prrw commented Jun 6, 2024

Hey thanks for the quick reply @cornerfarmer. However the directory did not exist before. Is the problem specific to Windows ?

UPDATE: So this error does not appear on Linux system. However, there I end up getting free(): invalid pointer error #1099

@cornerfarmer may be you would want to try to reproduce it on a windows system ?

@seedofshadow
Copy link

seedofshadow commented Jun 27, 2024

I also encountered this problem and found out it was caused by os.path.join, which uses '\' in windows whereas under unix it uses '/'. However Bop writer uses split('/') which does not recognize '\'. A possible workaround could be adding replace('\', '/').

@prrw
Copy link
Author

prrw commented Jun 27, 2024

Oh thanks. May be this can be resolved in the next commit ? @cornerfarmer

@cornerfarmer
Copy link
Member

cornerfarmer commented Jun 28, 2024

Sorry for the late reply, I have fixed that bug already on this branch https://github.com/DLR-RM/BlenderProc/tree/iss1108_bop_writer_windows
However, I found that there was a subsequent problem with the multiprocessing in the bop writer on windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first answer provided question Question, not yet a bug ;)
Projects
None yet
Development

No branches or pull requests

3 participants