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

Bug: Timespinner fails to generate on beta-website #4004

Open
palex00 opened this issue Sep 27, 2024 · 6 comments
Open

Bug: Timespinner fails to generate on beta-website #4004

palex00 opened this issue Sep 27, 2024 · 6 comments
Labels
affects: release/blocker Issues/PRs that must be addressed before next official release. is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs.

Comments

@palex00
Copy link
Contributor

palex00 commented Sep 27, 2024

What happened?

I tried to generate a website on archipelago.gg:24242 with a YAML made from the same website. Trying to generate gave me an "Internal Server Error"-warning. Generating the same YAML locally works fine.

Any YAML is affected. Scipio tried this:

name: TestName
game: Timespinner
Timespinner: {}

and it also did not generate.

What were the expected results?

That it would generate

Software

Website

@ScipioWright
Copy link
Collaborator

Additional info:
It fails when generating a single-player game directly from the options page, and also when uploading a yaml to the site.
AFAIK, it's only Timespinner.

@ScipioWright ScipioWright added is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. affects: release/blocker Issues/PRs that must be addressed before next official release. labels Sep 27, 2024
@palex00
Copy link
Contributor Author

palex00 commented Sep 27, 2024

Local Webhost Error Log:

[2024-09-27 19:01:30,560] Exception on /games/Timespinner/generate-yaml [POST]
Traceback (most recent call last):
  File "C:\Users\palex\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 1473, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\palex\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\palex\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\palex\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\app.py", line 865, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Archipelago Stuff\Archipelago-main\WebHostLib\options.py", line 278, in generate_yaml
    return generate_game({player_name: formatted_options})
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Archipelago Stuff\Archipelago-main\WebHostLib\options.py", line 55, in generate_game
    return start_generation(options, get_meta({}))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Archipelago Stuff\Archipelago-main\WebHostLib\generate.py", line 86, in start_generation
    options=pickle.dumps({name: vars(options) for name, options in gen_options.items()}),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_pickle.PicklingError: Can't pickle <class 'worlds.timespinner.Options.<class 'worlds.timespinner.Options.StartWithJewelryBox'>Hidden'>: attribute lookup <class 'worlds.timespinner.Options.StartWithJewelryBox'>Hidden on worlds.timespinner.Options failed

@palex00
Copy link
Contributor Author

palex00 commented Sep 27, 2024

Scipio said when they last got an "Internal Server Error" like this it had something to do with slot data.

@ScipioWright
Copy link
Collaborator

ScipioWright commented Sep 27, 2024

And it does indeed look like that's what is happening here

@ScipioWright
Copy link
Collaborator

From discussion on discord here: https://discord.com/channels/731205301247803413/731214280439103580/1289301564556709940
It is the f-string in OptionHider that is causing this

@Berserker66
Copy link
Member

Berserker66 commented Sep 28, 2024

It is neither the f-string nor slot data.
HoweverI posted a potential solution here:
https://discord.com/channels/731205301247803413/731214280439103580/1289329864641347637
That works for everything except DeathLink

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: release/blocker Issues/PRs that must be addressed before next official release. is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs.
Projects
None yet
Development

No branches or pull requests

3 participants