You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ python darksky_example.py
Traceback (most recent call last):
File "darksky_example.py", line 1, in <module>
from darksky import forecast
File "darksky_example.py", line 4, in <module>
from darksky import forecast
ImportError: cannot import name 'forecast'
Using this exact code:
from darksky import forecast
from datetime import date, timedelta
BOSTON = 42.3601, 71.0589
weekday = date.today()
with forecast('API_KEY', *BOSTON) as boston:
print(boston.daily.summary)
for day in boston.daily:
day = dict(day = date.strftime(weekday, '%a'),
sum = day.summary,
tempMin = day.temperatureMin,
tempMax = day.temperatureMax
)
print('{day}: {sum} Temp range: {tempMin} - {tempMax}'.format(**day))
weekday += timedelta(days=1)
Info: Python 3.6.9
The text was updated successfully, but these errors were encountered:
I installed via:
and get the following error:
Using this exact code:
Info: Python 3.6.9
The text was updated successfully, but these errors were encountered: