OoTRandomizer / OoT-Randomizer

A randomizer for Ocarina of Time.
Other
397 stars 230 forks source link

"collect" and "remove" functions in State.py causing errors. #2214

Closed 3pacgangstarap closed 1 month ago

3pacgangstarap commented 1 month ago

I think the issue is this line here if self.world.keyring_give_bk(dungeon_name): which appears in both functions. it's trying to call keyring_give_bk as a function, when it is a boolean variable. I'm not sure what the purpose of this function is or why it's trying to do that, but I occasionally get random errors when trying to generate a seed and traceback led me to this as the cause.

fenhl commented 1 month ago

World.keyring_give_bk is in fact a function, defined here:

https://github.com/OoTRandomizer/OoT-Randomizer/blob/f2980f29c4616a5c88a510a8c5db4baf421ab5c8/World.py#L1174-L1180

Could you give more information on how to reproduce this? Things like Python version, randomizer version, whether you're using the CLI or the GUI, settings used, etc.

jdunn596 commented 1 month ago

World.keyring_give_bk is in fact a function, defined here:

https://github.com/OoTRandomizer/OoT-Randomizer/blob/f2980f29c4616a5c88a510a8c5db4baf421ab5c8/World.py#L1174-L1180

Could you give more information on how to reproduce this? Things like Python version, randomizer version, whether you're using the CLI or the GUI, settings used, etc.

Shouldn't this return value be wrapped in all() or am I misunderstanding?

EDIT: nvm I'm an idiot, I read this as a tuple

3pacgangstarap commented 1 month ago

I'm actually having a lot of trouble reproducing it myself now, it was happening on generations where I had Randomize Main Settings turned on. looking deeper at the code I'm confused now why it was even throwing the error. I will continue testing. I'm using the gui, python 3.12.3

3pacgangstarap commented 1 month ago

okay the error was my fault. i was messing around with adding more stuff to the Randomize Main Settings option, and apparently the fact that the setting called keyring_give_bk has the same name as the world function keyring_give_bk was the issue. anyway the bug shouldn't actually exist in the source code, should have been obvious since i was only getting the error doing offline generation that it was because of something i messed with. whoops

it does raise the question though of whether there should be distinct names for those things.