ImportError

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

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

評価

難易度
2/5
見積もり時間
1時間未満
初心者へのやさしさ
15/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
api

調査の方向性

The traceback points to the reporter's own calendar.py at line 5, which imports googleapiclient.discovery. That module imports Python's standard-library calendar module, so a local file with the same name shadows it. Check whether the sample's file name clashes with a stdlib module, then confirm that renaming the local file lets the quickstart import succeed. No repository change is clearly needed, and the thread has been inactive for years.

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

説明

Expected Behavior

I'm not sure what the expected behavior should be because I couldn't get it to run the test code.

Actual Behavior

File "C:\Users\snydec4\Documents\Personal Programming Projects\Habitual Calendar\calendar.py", line 5, in
from googleapiclient.discovery import build
ImportError: cannot import name 'build' from partially initialized module 'googleapiclient.discovery' (most likely due to a circular import) (C:\Users\snydec4\AppData\Local\Programs\Python\Python38-32\lib\site-packages\googleapiclient\discovery.py)

Steps to Reproduce the Problem

  1. follow the instructions listed on
    https://developers.google.com/calendar/quickstart/python#further_reading
  2. run the test code

Specifications

  • Python version (python --version) -> python 3.8.1
  • OS (Mac/Linux/Windows) -> windows
主要言語
Python
スター
1.4k
フォーク
917
平均マージ
3分
マージ済み PR(30日)
1

環境構築

はじめの一歩

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

googleworkspace/python-samples のほかの issue

googleworkspace/python-samples の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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