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

Error when deciding not to quit a game with tw-play #168

Closed
bentrevett opened this issue Jun 3, 2019 · 2 comments · Fixed by #169
Closed

Error when deciding not to quit a game with tw-play #168

bentrevett opened this issue Jun 3, 2019 · 2 comments · Fixed by #169

Comments

@bentrevett
Copy link

I understand this is probably not the most important bug to fix, but I found it while manually inspecting some generated games.

To reproduce, first create a game with:

tw-make custom --world-size 5 --nb-objects 10 --quest-length 5 --seed 1234 --output tw_games/custom_game.ulx

Then begin to play the game with:

tw-play tw_games/custom_game.ulx

Immediately try and quit the game with "q" or "quit", when it asks "Are you sure you want to quit?" type either "n" or "no". This produces the error:

Traceback (most recent call last):
  File "/home/ben/miniconda3/envs/pytorch10/bin/tw-play", line 82, in <module>
    main()
  File "/home/ben/miniconda3/envs/pytorch10/bin/tw-play", line 69, in main
    game_state, reward, done = env.step(command)
  File "/home/ben/miniconda3/envs/pytorch10/lib/python3.7/site-packages/textworld/envs/glulx/git_glulx_ml.py", line 541, in step
    self.game_state = self.game_state.update(command, output)
  File "/home/ben/miniconda3/envs/pytorch10/lib/python3.7/site-packages/textworld/envs/glulx/git_glulx_ml.py", line 256, in update
    i7_events, game_state._feedback = _detect_i7_events_debug_tags(output)
  File "/home/ben/miniconda3/envs/pytorch10/lib/python3.7/site-packages/textworld/envs/glulx/git_glulx_ml.py", line 139, in _detect_i7_events_debug_tags
    open_tags.remove(tag_name)
ValueError: list.remove(x): x not in list
@tavianator
Copy link
Contributor

Thanks for the report! I believe #169 should fix it, let me know if it doesn't.

@bentrevett
Copy link
Author

Works for me! Thanks for the fix.

tavianator pushed a commit that referenced this issue Jul 8, 2019
tavianator pushed a commit that referenced this issue Jul 8, 2019
tavianator pushed a commit that referenced this issue Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants