AttributeError: partially initialized module 'graphene' has no attribute 'ObjectType' (most likely due to a circular import)
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 25/100
調査の方向性
issue 内の traceback と最小限の Python 例から始め、ローカルの v4/graphql.py エントリーポイントと graphene のインポートチェーンに注意してください。報告された動作を、記載された Python 3.9.7 環境で再現できるか確認してください。完了とは、これが Graphene のバグなのか、例のモジュール構成に固有の問題なのかを特定することです。
索引モデルが issue の本文から書いたものです。
説明
Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.
- What is the current behavior?
File "/Users/noj/recurrency/legacy-api/v4/graphql.py", line 1, in <module>
import graphene
File "/opt/homebrew/lib/python3.9/site-packages/graphene/__init__.py", line 3, in <module>
from .types import (
File "/opt/homebrew/lib/python3.9/site-packages/graphene/types/__init__.py", line 2, in <module>
from graphql import ResolveInfo
File "/Users/noj/recurrency/legacy-api/v4/graphql.py", line 3, in <module>
class Query(graphene.ObjectType):
AttributeError: partially initialized module 'graphene' has no attribute 'ObjectType' (most likely due to a circular import)
- If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
a github repo, https://repl.it or similar.
import graphene
class Query(graphene.ObjectType):
hello = graphene.String(description='A typical hello world')
def resolve_hello(self, info):
return 'World'
schema = graphene.Schema(query=Query)
if __name__ == "__main__":
query = '''
query SayHello {
hello
}
'''
result = schema.execute(query)
print (result)
- What is the expected behavior?
No errors.
-
Please tell us about your environment:
- Version: Python 3.9.7
- Platform: Mac
-
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow)
- 主要言語
- Python
- スター
- 8.2k
- フォーク
- 818
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
graphql-python/graphene のほかの issue
-
Tutorial mistakes オープン🐛 bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
graphql-python/graphene#1389 · コメント 5 件 · リアクション 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
graphql-python/graphene#1606 ·
-
Python 3.14 support オープン✨ enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 38/100
graphql-python/graphene#1601 · コメント 2 件 ·
-
✨ enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
graphql-python/graphene#1600 ·
-
🐛 bug
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
graphql-python/graphene#1593 ·
graphql-python/graphene の issue をすべて見る
似ている issue
-
agent-ready documentation needs-triage
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" オープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
instance instance add
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
searxng/searx-instances#939 · コメント 1 件 ·
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100