GeneralMills / pytrends

Pseudo API for Google Trends
Other
3.28k stars 821 forks source link

Date not working #54

Closed gururise closed 8 years ago

gururise commented 8 years ago
trend_payload = {'q': ['pizza','macaroni'],'date':'now 7-d'}
df = pytrend.trend(trend_payload, return_type='dataframe')
print(df)

results in:

Traceback (most recent call last):
  File "trend.py", line 16, in <module>
    df = pytrend.trend(trend_payload, return_type='dataframe')
  File "/usr/lib/python3.5/site-packages/pytrends-3.0.0-py3.5.egg/pytrends/request.py", line 81, in trend
  File "/usr/lib/python3.5/site-packages/pytrends-3.0.0-py3.5.egg/pytrends/request.py", line 154, in _trend_dataframe
TypeError: 'NoneType' object is not subscriptable

I also tried: trend_payload = {'q': ['pizza','macaroni'],'date':'today 7-d'}

with the same error result.

dreyco676 commented 8 years ago

Ah, thanks this is good to know. I should have a fix in the next hour or so.

dreyco676 commented 8 years ago

Should be fixed now. Reopen if not.