NicoVanDerDussen
Posts: 74
Joined: Sat Aug 24, 2013 2:41 pm

gspread module problem

Mon Apr 28, 2014 10:13 am

Hi,

I'm trying to connect with gspread using http://www.danielhansen.net/2013/03/ras ... .html#more

my code

Code: Select all

import os, glob, time, gspread, sys, datetime

#Google account details
email = 'xxxx@gmail.com'
password = 'yyyy'
spreadsheet = 'tester' #the name of the spreadsheet already created

#attempt to log in to your google account
try:
    gc = gspread.login(email,password)
except:
    print('fail')
    sys.exit()
results in

Traceback (most recent call last):
File "./danielhansen.py", line 5, in <module>
import os, glob, time, gspread, sys, datetime
File "/home/pi/tempmonitor/gspread.py", line 4, in <module>
gc = gspread.login('xxxx@gmail.com', 'yyyy')
AttributeError: 'module' object has no attribute 'login'


I followed the code at https://github.com/burnash/gspread/blob ... /README.md and get the same error.

What have i missed? :)

thanks
Nico
Setting up your Raspberry Pi to work with a 3G dongle http://nvdd.info/11gKrsZ

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: gspread module problem

Mon Apr 28, 2014 11:34 am

Are there any files called gspread in your current folder?
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

User avatar
davef21370
Posts: 897
Joined: Fri Sep 21, 2012 4:13 pm
Location: Earth But Not Grounded

Re: gspread module problem

Mon Apr 28, 2014 11:50 am

elParaguayo wrote:Are there any files called gspread in your current folder?
That'll be it... File "/home/pi/tempmonitor/gspread.py", line 4, in <module> the source file is called gspread, rename that and it should be fine.

Dave.
Apple say... Monkey do !!

afedriansyah
Posts: 18
Joined: Mon Feb 26, 2018 6:32 am

Re: gspread module problem

Mon Feb 26, 2018 6:36 am

Hi I've been trying to install gpsread oauth2client module on raspberry pi 3 but this message appears. I'm using raspbian stretch.
"could not find version that satisfies the requirement oauth2client ( from version: ) no matching distribution found for oauth2client"
I really neeed help with this thank you

afedriansyah
Posts: 18
Joined: Mon Feb 26, 2018 6:32 am

Re: gspread module problem

Tue Feb 27, 2018 3:05 am

Hi i've been trying to do this command "pip install oauth2client"
but this message appears "Could not find a version that satisfies the requirement oauth2client (from version ) No matching distribution found for oauth2client.

Another question is : is it truly important to install oauth2client into my raspberry pi to enable gspread database or are there more alternatives to use gpsread in raspberry pi

Detail answers would be appreciated
Thank you very much

Return to “Python”