高度なコーディング コースで API を使用しようとしていますが、何をしても、常にこのエラーが発生します。どうすれば...ええと...エラーが発生しませんか? 前もって感謝します。
ETA: IDLE 3.4 を使用していると思います。
from pprint import pprint
import requests
import encodings.idna
r = requests.get('http://api.openweathermap.org/data/2.5/weather?q=London')
pprint(r.json())
今、次のようなエラーが表示されます。
Traceback (most recent call last):
File "/Users/lilyevans/APIproject.py", line 4, in <module>
r = requests.get('http://api.openweathermap.org/data/2.5/weather?q=London')
AttributeError: 'module' object has no attribute 'get'