question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: cannot import name 'v4'

See original GitHub issue

So, I’m trying to import the gspread library, but after freezing for a few seconds, the console spits out an error in doing so.

Environment info

Operating System: Windows 7 Python version: 3.6 gspread version: 2.0.0

Steps to reproduce

  1. Install gspread and oauth2 (both using Git Bash, acquired at https://git-scm.com/)
  2. Try executing import gspread

Stack trace or other output that would be helpful

File "C:\Users\[user]\AppData\Local\Python\Python36-32\lib\site-packages\gspread-2.0.0-py3.6.egg\gspread\__init__.py", line 28, in <module> ImportError: cannot import name 'v4'

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:27 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
hjbct44commented, Mar 19, 2018

I just reinstalled using pip install gspread==2.0.0 and looks like it is working (i’m not getting import error).

0reactions
doughazellcommented, Jul 12, 2018

I had the same issue as @hjbct44 (who I suspect was off track with the issue initially raised here but helped solve my problem) on an upgrade from 0.6.2 to 3.0.1 and got:

Google Sheets API error gspread.exceptions.APIError: { “error”: { “code”: 403, “message”: "Google Sheets API has not been used in project XXX before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/sheets.googleapis.com/overview?project=XXX

which didn’t work until I disabled and renabled Google Drive API which then allowed me to successfully enable Google Sheets API.

Could this be added to the instructions for upgrading an existing project previously using the old Google API?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: cannot import name '_unicodefun' from 'click'
As a workaround, pin click to the last version via pip install --upgrade click==8.0.2 . Share.
Read more >
How to Fix : “ImportError: Cannot import name X” in Python?
You can solve the “ ImportError : Cannot import name X” Error by resolving the circular dependencies. You can do that either by...
Read more >
How to Fix ImportError: Cannot Import Name in Python - Rollbar
The Python ImportError: cannot import name error occurs when an imported class is not accessible or is in a circular dependency.
Read more >
ImportError: cannot import name 'url' from django.conf.urls
The "ImportError: cannot import name 'url' from 'django.conf.urls'" occurs because django.conf.urls.url() has been deprecated and removed in ...
Read more >
importerror: cannot import name from partially initialized module
ImportError: cannot import name 'x1' from partially initialized module 'x'. To resolve the ImportError: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found