latitudegames / AIDungeon

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

[BUG] Play game code block returns exceptions, "No module named 'regex._regex'; " #179

Closed DanMcInerney closed 4 years ago

DanMcInerney commented 4 years ago

🐛 Bug Report

Describe the bug Exception thrown when running #Play code after running installation and model download.

How to Reproduce

  1. Go to https://colab.research.google.com/github/nickwalton/AIDungeon/blob/master/AIDungeon_2.ipynb
  2. Run the install block, wait for completion message
  3. Run the download model block, wait for completion message
  4. Run play game block
  5. See error:
    
    File "play.py", line 6, in <module>
    from generator.gpt2.gpt2_generator import *
    File "/content/AIDungeon/generator/gpt2/gpt2_generator.py", line 7, in <module>
    from generator.gpt2.src import encoder, model, sample
    File "/content/AIDungeon/generator/gpt2/src/encoder.py", line 7, in <module>
    import regex as re
    File "/content/AIDungeon/venv/lib/python3.6/site-packages/regex.py", line 402, in <module>
    import _regex_core
    File "/content/AIDungeon/venv/lib/python3.6/site-packages/_regex_core.py", line 21, in <module>
    import regex._regex as _regex
    ModuleNotFoundError: No module named 'regex._regex'; 'regex' is not a package```

Additional context

omidh28 commented 4 years ago

It's working again for me

ben-bay commented 4 years ago

Yikes!

ben-bay commented 4 years ago

I'm not getting this when I play on master. Maybe it's fixed?

DanMcInerney commented 4 years ago

Appears fixed.