-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
I installed via:
$ sudo pip uninstall darksky && pip install darkskylib --upgrade --no-cache- --force-reinstall
and get the following error:
$ 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels