ModuleNotFoundError: No module named 'gspread.models'

I´m using gspread in Colab and upgraded it to enable the set_timeout option, but now using gspread_dataframe gives the error ModuleNotFoundError: No module named 'gspread.models' Thanks in advance. my Code:

#!pip install gspread --upgrade #!pip install gspread-dataframe #!pip install openpyxl import pandas as pd import numpy as np import time import gspread from gspread_dataframe import get_as_dataframe, set_with_dataframe from datetime import datetime from datetime import timedelta #from gspread_formatting.dataframe import format_with_dataframe gspread.__version__ 5.2.0 
1

2 Answers

Solved!


!pip uninstall gspread-dataframe Successfully uninstalled gspread-dataframe-3.0.8 pip install gspread-dataframe Successfully installed gspread-dataframe-3.2.2 *** 
1

For those using gspread directly this error is because in 5.x versions of gspread you should use:

from gspread import Worksheet 

instead of

from gspread.models import Worksheet 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like