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

'module textworld has no attribute render' #352

Closed
christopherzc opened this issue Sep 26, 2024 · 3 comments · Fixed by #353
Closed

'module textworld has no attribute render' #352

christopherzc opened this issue Sep 26, 2024 · 3 comments · Fixed by #353

Comments

@christopherzc
Copy link

Hello,

I am trying to run the "Handcrafting a game.ipynb" notebook in colab, however I run into the error 'module 'textworld' has no attribute 'render'' at the third cell.

@MarcCote
Copy link
Contributor

Hi @christopherzc, I just want to make sure, did you install the visualization dependencies? (see https://github.com/microsoft/TextWorld?tab=readme-ov-file#visualization)

pip install textworld[vis]

@christopherzc
Copy link
Author

Hi @MarcCote , thanks for responding so quickly!

I believe so, in the first cell I ran:

!apt install chromium-chromedriver
!pip install selenium==3.12.0
# then
!pip install textworld[vis]

Followed by:

import textworld
from textworld import GameMaker

# Make the generation process reproducible.
from textworld import g_rng  # Global random generator.
g_rng.set_seed(20180916)

# GameMaker object for handcrafting text-based games.
M = GameMaker()

However on the third cell:

roomA = M.new_room("Room A")
roomB = M.new_room("Room B")
corridor = M.connect(roomA.east, roomB.west)
M.render()

The line M.render() returns the error:

image

@MarcCote
Copy link
Contributor

My bad, it seems a typo sneaked in 10 months ago. Thanks!

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

Successfully merging a pull request may close this issue.

2 participants