Skip to content

RecursionError: maximum recursion depth exceeded while calling a Python object #32

@avinash-218

Description

@avinash-218

Thank you for this wonderful repo.
I am creating this issue due to the maximum recursion error,

----- Generate Images2/9.png at pos [0 0 0] rot [ 0 0 90] scale [1, 1, 1] -----
Approximated apartment size : 1722464.5
Created file : Data/0/floor_verts.txt
Created file : Data/0/floor_faces.txt
Walls created : 3985
Created file : Data/0/wall_vertical_verts.txt
Created file : Data/0/wall_vertical_faces.txt
Created file : Data/0/wall_horizontal_verts.txt
Created file : Data/0/wall_horizontal_faces.txt
Number of rooms detected : 12
Created file : Data/0/room_verts.txt
Created file : Data/0/room_faces.txt
Windows created : 813
Created file : Data/0/window_vertical_verts.txt
Created file : Data/0/window_vertical_faces.txt
Created file : Data/0/window_horizontal_verts.txt
Created file : Data/0/window_horizontal_faces.txt
Traceback (most recent call last):
File "main.py", line 174, in
data_paths = [execution.simple_single(floorplans[0])]
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/execution.py", line 21, in simple_single
filepath, _ = generate.generate_all_files(floorplan, show)
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/generate.py", line 87, in generate_all_files
Window(gray, path, floorplan.image_path, scale_factor, scale, info)
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/generator.py", line 336, in init
super().init(gray, path, scale, info)
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/generator.py", line 39, in init
self.shape = self.generate(gray, info)
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/generator.py", line 396, in generate
return self.get_shape(self.verts)
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/generator.py", line 53, in get_shape
poslist = transform.verts_to_poslist(verts)
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/transform.py", line 114, in verts_to_poslist
list_of_elements = flatten_iterative_safe(verts, []) # TODO: this stopped working!
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/transform.py", line 104, in flatten_iterative_safe
return flatten_iterative_safe(thelist[1:], res)
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/transform.py", line 104, in flatten_iterative_safe
return flatten_iterative_safe(thelist[1:], res)
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/transform.py", line 104, in flatten_iterative_safe
return flatten_iterative_safe(thelist[1:], res)
[Previous line repeated 980 more times]
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/transform.py", line 103, in flatten_iterative_safe
res.extend(flatten_iterative_safe(thelist[0], []))
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/transform.py", line 104, in flatten_iterative_safe
return flatten_iterative_safe(thelist[1:], res)
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/transform.py", line 104, in flatten_iterative_safe
return flatten_iterative_safe(thelist[1:], res)
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/transform.py", line 104, in flatten_iterative_safe
return flatten_iterative_safe(thelist[1:], res)
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/transform.py", line 103, in flatten_iterative_safe
res.extend(flatten_iterative_safe(thelist[0], []))
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/transform.py", line 101, in flatten_iterative_safe
return flatten_iterative_safe(thelist[1:], res)
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/transform.py", line 101, in flatten_iterative_safe
return flatten_iterative_safe(thelist[1:], res)
File "/home/ubuntu/FloorplanToBlender3d/FloorplanToBlenderLib/transform.py", line 96, in flatten_iterative_safe
if not thelist or not isinstance(thelist, list):
RecursionError: maximum recursion depth exceeded while calling a Python object

I used the below images,
8
9
5
6

Can anyone please tell me why this issue occurs for some images and how to tackle this?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions