Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Unable to import textworld in colab

オープン
#320 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
jupyter-notebook, python

調査の方向性

Colab で「Building a simple agent」ノートブックを開いて、インポートに失敗する問題を再現します。tatsu/grammars.py と textworld/envs/wrappers/tw_inform7.py で失敗している import を調べ、その後、Python 3.10 のエラーや循環インポートによる失敗が発生せずに textworld のインポートが完了することを確認します。

索引モデルが issue の本文から書いたものです。

説明

Hi, I'm running the notebook 'Building a simple agent' in colab and have encountered the following ImportError when I tried to import textworld.

/usr/local/lib/python3.10/dist-packages/tatsu/grammars.py in
4 import os
5 import functools
----> 6 from collections import defaultdict, Mapping
7 from copy import copy
8 from itertools import takewhile

ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/init.py)

I tried replacing 'from collections import Mapping' with 'from collections.ac import Mapping' and got this error instead:

/usr/local/lib/python3.10/dist-packages/textworld/envs/wrappers/tw_inform7.py in
91
92
---> 93 class TWInform7(textworld.core.Wrapper):
94 """
95 Wrapper to play Inform7 games generated by TextWorld.

AttributeError: partially initialized module 'textworld' has no attribute 'core' (most likely due to a circular import)

The installation of textworld was sucessfull.

主要言語
Jupyter Notebook
スター
1.4k
フォーク
207
平均マージ
8日 22時間
マージ済み PR(30日)
1

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/TextWorld のほかの issue

microsoft/TextWorld の issue をすべて見る

似ている issue

DevTools の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。