ImportError

Aberta
#148 1 comentário 1 reação 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
Menos de uma hora
Facilidade para iniciantes
15/100
Tipo de issue
Bug
Clareza
Precisa de esclarecimento
Status de atividade
Estagnada
Stack de tecnologia
python
Domínio
api

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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
Linguagem predominante
Python
Estrelas
1.4k
Forks
917
Merge médio
3min
PRs com merge (30d)
1

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de googleworkspace/python-samples

Todas as issues de googleworkspace/python-samples

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.