latitudegames / AIDungeon

Infinite adventures await!
http://www.aidungeon.io/
MIT License
3.19k stars 554 forks source link

[BUG] /restart yields error #175

Closed perstar closed 4 years ago

perstar commented 4 years ago

🐛 Bug Report

Describe the bug /revert yields an error.

> /restart
Please rate the story quality from 1-10: 5
Game saved.
To load the game, type 'load' and enter the following ID: a18f350c-202c-11ea-a572-0242ac1c0002
Traceback (most recent call last):
  File "play.py", line 292, in <module>
    play_aidungeon_2()
  File "play.py", line 127, in play_aidungeon_2
    while story_manager.story is None: 
AttributeError: 'UnconstrainedStoryManager' object has no attribute 'story'

How to Reproduce

  1. Run on colab (install; download model; play)
  2. /restart
ben-bay commented 4 years ago

What branch is this bug occurring on?

ben-bay commented 4 years ago

Also, it is /revert, /restart, or both?

perstar commented 4 years ago

\restart. Sorry my mind was slipping while typing, but the cut-and-paste is true!

Regarding branch I'm just following the official link to play the game. When doing it now again I see that it is using --branch master.

MilenkoBonacich commented 4 years ago

the game deletes the current story atribute, but doesn't initalizes it as a "None" again.

while True: if story_manager.story != None: del story_manager.story while story_manager.story is None:

find play.py in the game's folder and then add story_manager.story=None under del story_manager.story it's probably a handfisted fix, but it works

ben-bay commented 4 years ago

No idea how this slipped in, thanks for pointing it out.

ben-bay commented 4 years ago

Added this fix.