TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
monajalal opened this issue · 1 comments
monajalal commented
I get this error:
(blenderproc) mona@ada:~/BlenderProc2_Cobot/BlenderProc$ bash ./scripts/generate_dataset
( 0.0000 sec | 0.0000 sec) Importing OBJ '/home/mona/BlenderProc2_Cobot/BlenderProc/blenderproc_resources/decomposition_cache/3534173949356700691.obj'...
( 0.0001 sec | 0.0000 sec) Parsing OBJ file...
( 0.0026 sec | 0.0025 sec) Done, loading materials and images...
ProgressMaterial not found MTL: '/home/mona/BlenderProc2_Cobot/BlenderProc/blenderproc_resources/decomposition_cache/decomp.mtl'
( 0.0063 sec | 0.0062 sec) Done, building geometries (verts:559 faces:860 materials: 64 smoothgroups:0) ...
( 0.0534 sec | 0.0533 sec) Done.
( 0.0535 sec | 0.0534 sec) Finished importing: '/home/mona/BlenderProc2_Cobot/BlenderProc/blenderproc_resources/decomposition_cache/3534173949356700691.obj'
Progress: 100.00%
( 0.0000 sec | 0.0000 sec) Importing OBJ '/home/mona/BlenderProc2_Cobot/BlenderProc/blenderproc_resources/decomposition_cache/3534173949356700691.obj'...
( 0.0001 sec | 0.0000 sec) Parsing OBJ file...
( 0.0027 sec | 0.0026 sec) Done, loading materials and images...
ProgressMaterial not found MTL: '/home/mona/BlenderProc2_Cobot/BlenderProc/blenderproc_resources/decomposition_cache/decomp.mtl'
( 0.0065 sec | 0.0064 sec) Done, building geometries (verts:559 faces:860 materials: 64 smoothgroups:0) ...
( 0.0617 sec | 0.0616 sec) Done.
( 0.0618 sec | 0.0617 sec) Finished importing: '/home/mona/BlenderProc2_Cobot/BlenderProc/blenderproc_resources/decomposition_cache/3534173949356700691.obj'
Progress: 100.00%
Running simulation up to 1 seconds (24 frames)
Running simulation up to 2 seconds (48 frames)
Running simulation up to 3 seconds (72 frames)
Running simulation up to 4 seconds (96 frames)
Running simulation up to 5 seconds (120 frames)
Running simulation up to 6 seconds (144 frames)
Running simulation up to 7 seconds (168 frames)
Running simulation up to 8 seconds (192 frames)
Running simulation up to 9 seconds (216 frames)
Running simulation up to 10 seconds (240 frames)
Running simulation up to 11 seconds (264 frames)
Running simulation up to 12 seconds (288 frames)
Running simulation up to 13 seconds (312 frames)
Running simulation up to 14 seconds (336 frames)
Running simulation up to 15 seconds (360 frames)
Running simulation up to 16 seconds (384 frames)
Running simulation up to 17 seconds (408 frames)
Running simulation up to 18 seconds (432 frames)
Running simulation up to 19 seconds (456 frames)
Stopping simulation as configured max_simulation_time has been reached
Error: Python: Traceback (most recent call last):
File "/home/mona/BlenderProc2_Cobot/BlenderProc/./main_rand.py", line 162, in <module>
camera_num = int(args.camera_num)
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error: script failed, file: './main_rand.py', exiting.
Cleaning temporary directory
0%|█▏ | 13/3750 [08:34<38:52:39, 37.45s/it]python /home/mona/BlenderProc2_Cobot/BlenderProc/cli.py run ./main_rand.py ../synthetic_dataset/random3 --custom-blender-path /home/mona/Downloads/blender-3.5.1-linux-x64
Using blender in /home/mona/Downloads/blender-3.5.1-linux-x64
Using temporary directory: /dev/shm/blender_proc_df642106efc84cf691ffb7198a9baaa6
Blender 3.5.1 (hash e1ccd9d4a1d3 built 2023-04-24 23:31:15)
/home/mona/Downloads/blender-3.5.1-linux-x64/3.5/python/lib/python3.10/site-packages/numpy/core/getlimits.py:500: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
setattr(self, word, getattr(machar, word).flat[0])
/home/mona/Downloads/blender-3.5.1-linux-x64/3.5/python/lib/python3.10/site-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
return self._float_to_str(self.smallest_subnormal)
/home/mona/Downloads/blender-3.5.1-linux-x64/3.5/python/lib/python3.10/site-packages/numpy/core/getlimits.py:500: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
setattr(self, word, getattr(machar, word).flat[0])
/home/mona/Downloads/blender-3.5.1-linux-x64/3.5/python/lib/python3.10/site-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is
monajalal commented
fixed by adding a default value to camera_num in main_rand.py
parser.add_argument('camera_num', default="2", nargs='?', help="Which Camera you would like to use: 0-Beslar 1-Zed_2i 2-Zed_mini")