joshcarty / google-searchconsole

A wrapper for the Google Search Console API.
MIT License
222 stars 80 forks source link

AttributeError: 'NoneType' object has no attribute 'query' #19

Closed renekyewski closed 4 years ago

renekyewski commented 5 years ago

Hi Josh! Thanks for your package but I can't get it to work unfortunately. I get the following error for this line: report = webproperty.query.range('today', days=-2).dimension('query').get()

AttributeError: 'NoneType' object has no attribute 'query'

Thanks for your help

joshcarty commented 5 years ago

Thanks! Double check the URL you have used to create your webproperty object. You need the correct http(s):// and to include any trailing slashes.

matija2209 commented 5 years ago

Have the same problem no matter what I type in. Is this somehow connected to OAuth 2.0 credentials?

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'query'
joshcarty commented 5 years ago

Possibly, run print(account.webproperties) and check that the URL you are looking to query is in there.