Closed DaVinci789 closed 8 years ago
I know this is kind of annoying, but you have to open a Python shell in the textbasedgame directory and type this (I'm working on a solution):
import shelve shelf = shelve.open('savefile') shelf['firstTime'] = True shelf.close()
Then you should be able to run the game with savefile functionality.
On Dec 20, 2015, at 10:35 AM, DaVinci789 notifications@github.com wrote:
Whenever I try to start this, a keyerror is raised from shelvepy
Traceback (most recent call last): File "/usr/lib/python35/shelvepy", line 111, in getitem value = selfcache[key] KeyError: 'firstTime'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "programming/git_clone/textbasedgame/mainpy", line 207, in if not saveFile['firstTime']: File "/usr/lib/python35/shelvepy", line 113, in getitem f = BytesIO(selfdict[keyencode(selfkeyencoding)]) KeyError: b'firstTime'
cloned from commit 5a593f1
— Reply to this email directly or view it on GitHub.
I have created a Temporary Patch for this Issue. All seems to be functional. If this works for Allan, this issue may be closed.
Let me try it
Also ported it to python3.
See latest commit. Fixed.
Whenever I try to start this, a keyerror is raised from shelve.py
Traceback (most recent call last): File "/usr/lib/python3.5/shelve.py", line 111, in getitem value = self.cache[key] KeyError: 'firstTime'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "programming/git_clone/textbasedgame/main.py", line 207, in
if not saveFile['firstTime']:
File "/usr/lib/python3.5/shelve.py", line 113, in getitem
f = BytesIO(self.dict[key.encode(self.keyencoding)])
KeyError: b'firstTime'
cloned from commit 5a593f19ec0ec6ed7c81917722c263edaca15e05