ImportError

Đang mở
#148 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
15/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Python
Star
1.4k
Fork
917
Merge trung bình
3 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của googleworkspace/python-samples

Tất cả issue của googleworkspace/python-samples

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.