location = geolocator.geocode(" ".join(address.values()))
if location.longitude is not None:
node['pos'] = [location.longitude, location.latitude]
Run Code Online (Sandbox Code Playgroud)
不明白的方式我仍然得到这个错误:
File "/home/easypc/Documents/Udacity_nano_degree/Data_Wrangling/audit_vilnius.py", line 167, in shape_element
if location.longitude is not None:
AttributeError: 'NoneType' object has no attribute 'longitude'
Run Code Online (Sandbox Code Playgroud)