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

maximum recursion depth exceeded while calling a Python object #79

Open
Surdjak opened this issue Jun 26, 2023 · 1 comment
Open

maximum recursion depth exceeded while calling a Python object #79

Surdjak opened this issue Jun 26, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Surdjak
Copy link

Surdjak commented Jun 26, 2023

It's pretty obvious why it happened but I still wanted to report this.
In short, there's most likely too much randomization as all the ER options are activated and i'm trying to generate a 4-world coop seed.
Removing one-way still lead to an error but not a python one at least, it's the "too much tries" one.
I don't know if main branch intend to include your changes or something close to it but either way they will probably come up with the same problem if it's indeed just a combinatorial problem. I don't know if a better logic can be used but if it does, I imagine it would be a pretty big refactor.

Setting string: HSARCSBSL62AEMTDDS7PF8KA4QMERGA9CAAKSBJ6399P55Z495STAAEACJD8SZAAAAADA5VASST87A2VECHV9

Update: Took me a while to notice the obvious but it happens when generating the spoiler. Short term solution would be to not generate it.

maximum recursion depth exceeded while calling a Python object
Traceback (most recent call last):
  File "D:\N64\Randomizers\OoT-Randomizer-Fork\OoTRandomizer.py", line 58, in start
    main(settings)
  File "D:\N64\Randomizers\OoT-Randomizer-Fork\Main.py", line 46, in main
    spoiler = generate(settings)
  File "D:\N64\Randomizers\OoT-Randomizer-Fork\Main.py", line 120, in generate
    return make_spoiler(settings, worlds)
  File "D:\N64\Randomizers\OoT-Randomizer-Fork\Main.py", line 180, in make_spoiler
    spoiler.create_playthrough()
  File "D:\N64\Randomizers\OoT-Randomizer-Fork\Spoiler.py", line 144, in create_playthrough
    worlds = self.copy_worlds()
  File "D:\N64\Randomizers\OoT-Randomizer-Fork\Spoiler.py", line 122, in copy_worlds
    worlds = [world.copy(copy_dict=copy_dict) for world in self.worlds]
  File "D:\N64\Randomizers\OoT-Randomizer-Fork\Spoiler.py", line 122, in <listcomp>
    worlds = [world.copy(copy_dict=copy_dict) for world in self.worlds]
  File "D:\N64\Randomizers\OoT-Randomizer-Fork\World.py", line 361, in copy
    new_world.dungeons = [dungeon.copy(copy_dict=copy_dict) for dungeon in self.dungeons]
  File "D:\N64\Randomizers\OoT-Randomizer-Fork\World.py", line 361, in <listcomp>
    new_world.dungeons = [dungeon.copy(copy_dict=copy_dict) for dungeon in self.dungeons]
  File "D:\N64\Randomizers\OoT-Randomizer-Fork\Dungeon.py", line 38, in copy
    new_dungeon.regions = [region.copy(copy_dict=copy_dict) for region in self.regions]
  File "D:\N64\Randomizers\OoT-Randomizer-Fork\Dungeon.py", line 38, in <listcomp>
    new_dungeon.regions = [region.copy(copy_dict=copy_dict) for region in self.regions]
  File "D:\N64\Randomizers\OoT-Randomizer-Fork\Region.py", line 62, in copy
    new_region.exits = [entrance.copy(copy_dict=copy_dict) for entrance in self.exits]
  File "D:\N64\Randomizers\OoT-Randomizer-Fork\Region.py", line 62, in <listcomp>
    new_region.exits = [entrance.copy(copy_dict=copy_dict) for entrance in self.exits]
  File "D:\N64\Randomizers\OoT-Randomizer-Fork\Entrance.py", line 40, in copy
    new_entrance.connected_region = self.connected_region.copy(copy_dict=copy_dict)
  File "D:\N64\Randomizers\OoT-Randomizer-Fork\Region.py", line 63, in copy
    new_region.locations = [location.copy(copy_dict=copy_dict) for location in self.locations]
  File "D:\N64\Randomizers\OoT-Randomizer-Fork\Region.py", line 63, in <listcomp>
    new_region.locations = [location.copy(copy_dict=copy_dict) for location in self.locations]
  File "D:\N64\Randomizers\OoT-Randomizer-Fork\Location.py", line 64, in copy
    new_location.item = self.item.copy(copy_dict=copy_dict)
  [...]
RecursionError: maximum recursion depth exceeded while calling a Python object
@Roman971
Copy link
Owner

Roman971 commented Jul 3, 2023

Thank you for your report and all the details, it does look like there is a general issue with generating multiworld seeds with a lot of shuffle settings. I was able to reproduce it in the main branch as well so it doesn't seem to be related to any of the changes specific to my branch, but I brought it up to the others so it can be looked into.

Also it can happen without any ER settings so disabling the spoiler log is probably the only workaround for now. Either that or disabling a certain amount of Item Shuffle settings because it looks like it only happens when a lot of those are enabled (probably due to the amount of items to handle for the randomizer)

@Roman971 Roman971 added the bug Something isn't working label Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants