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

KeyError in Sample.py #127

Open
lucav31 opened this issue Apr 6, 2018 · 1 comment
Open

KeyError in Sample.py #127

lucav31 opened this issue Apr 6, 2018 · 1 comment

Comments

@lucav31
Copy link

lucav31 commented Apr 6, 2018

I used the program all the day and it worked great but with my last experiment I got the following error message:

Traceback (most recent call last):
File "sample.py", line 46, in
main()
File "sample.py", line 27, in main
sample(args)
File "sample.py", line 43, in sample
args.sample).encode('utf-8'))
File "C:\Daten\Programmierung\Python\JokeGenerator\char-rnn-tensorflow-master\char-rnn-tensorflow-master\model.py", line 106, in sample
x[0, 0] = vocab[char]
KeyError: ' '

Seems like anything is wrong with the arguments, but I haven't changed anything.
BTW, really nice program & fun to use. Thank you.

@santoshchanveer
Copy link

santoshchanveer commented Apr 7, 2018

python sample.py --prime (your input )

  1. dont use double quotes for input word
  2. if you are using anaconda prompt then---
    goto console properties and enable the use lagacy console option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants