Skip to content

Language: Resource Warning and Fill Error resolve#2599

Open
JackTriton wants to merge 2 commits into
OoTRandomizer:Devfrom
JackTriton:Language-RW+LFErrorFix
Open

Language: Resource Warning and Fill Error resolve#2599
JackTriton wants to merge 2 commits into
OoTRandomizer:Devfrom
JackTriton:Language-RW+LFErrorFix

Conversation

@JackTriton

Copy link
Copy Markdown

When using Unittest.py, it'll raise ResourseWarning because of json.load(open(...))
I made sure that load and open are now separated

Also, there was an error with Fill.py and EntranceShuffle.py while Unittest
This was caused around entrance.sav so I inspect all of the files and found out that unrelated RNG causing this (around Language functions)
I changed the RNG distribution on World.py and Main.py and now it's fixed

Comment thread Main.py Outdated
generation_rng_state = random.getstate()
spoiler = None
for attempt in range(1, max_attempts + 1):
if attempt == 1:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RNG should not need to be reset like this (and the attempt == 1 branch doesn't seem to do anything, should have been > 1 and no else branch).

If the settings object is not fully resolved or is tweaked by the language stuff after resolve_settings, there is a bigger fundamental problem that needs to be fixed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, should I avoid the changes I made with World.py as well?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep.

@JackTriton JackTriton Jul 3, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll find a way to resolve the issue without changing these 2

@fenhl fenhl added Type: Bug Something isn't working Status: Waiting for Author Changes or response requested Status: Needs Review Someone should be looking at it Component: Randomizer Core Generally the core functions of the python Status: Needs Testing Probably should be tested labels Jul 3, 2026
@JackTriton

JackTriton commented Jul 3, 2026

Copy link
Copy Markdown
Author

@mracsys I think I found the reason: __version__ change
numeric_seed is calculated using settings_string + distribution + __version__ + seed
This change causing some kind of error so releasing version won't have the issue
What kind of fix should be suitable for this?

EDIT: The issue won't be raised if the version becomes 9.1.17 f.LUM

@flagrama

flagrama commented Jul 3, 2026

Copy link
Copy Markdown

If you are talking about the same random EntranceShuffle error that occasionally shows up in the Unit Tests that I think you are, it is usually fine and can be ignored if you can verify another seed does not cause the issue.

@JackTriton

Copy link
Copy Markdown
Author

@flagrama Thanks
I think that's the case as well

@mracsys

mracsys commented Jul 3, 2026

Copy link
Copy Markdown

@mracsys I think I found the reason: __version__ change numeric_seed is calculated using settings_string + distribution + __version__ + seed This change causing some kind of error so releasing version won't have the issue What kind of fix should be suitable for this?

EDIT: The issue won't be raised if the version becomes 9.1.17 f.LUM

Should be good as-is for now like flag and others said. Eventually the test should be hardened as discussed on Discord, though that should be a separate PR IMO.

@JackTriton JackTriton requested a review from mracsys July 5, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Randomizer Core Generally the core functions of the python Status: Needs Review Someone should be looking at it Status: Needs Testing Probably should be tested Status: Waiting for Author Changes or response requested Type: Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants