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

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

Open
avinash-218 opened this issue Nov 8, 2023 · 1 comment

Comments

@avinash-218
Copy link

avinash-218 commented Nov 8, 2023

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

@Rathesh07
Copy link

it seems like when i use file other than in the examples folder it gives this error

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