Hello community,
Any ideas why the following code doesn't work?
<SPAN class="keyword token">from</SPAN> arcgis <SPAN class="keyword token">import</SPAN> geometry
input_geometry <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">{</SPAN>
<SPAN class="string token">"xmin"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">191038.7271550147</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"ymin"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">493884.06809108134</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"xmax"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">1011248.7009082956</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"ymax"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">971193.3560429906</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"spatialReference"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="string token">"wkid"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">2157</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"latestWkid"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">2157</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">]</SPAN>
projected_extent <SPAN class="operator token">=</SPAN> geometry<SPAN class="punctuation token">.</SPAN>project<SPAN class="punctuation token">(</SPAN>geometries<SPAN class="operator token">=</SPAN>input_geometry<SPAN class="punctuation token">,</SPAN>
in_sr<SPAN class="operator token">=</SPAN><SPAN class="number token">2157</SPAN><SPAN class="punctuation token">,</SPAN>
out_sr<SPAN class="operator token">=</SPAN><SPAN class="number token">4326</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN><SPAN class="punctuation token">(</SPAN>projected_extent<SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>I get the following error message:

AttributeError: 'NoneType' object has no attribute '_tools'
The same error appears when I run the example code snippet in the documentation on which this is based:
<SPAN class="keyword token">from</SPAN> arcgis<SPAN class="punctuation token">.</SPAN>geometry <SPAN class="keyword token">import</SPAN> project
input_geom <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">{</SPAN><SPAN class="string token">'x'</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="operator token">-</SPAN><SPAN class="number token">17568824.55</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'y'</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">2428377.35</SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">{</SPAN><SPAN class="string token">'x'</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="operator token">-</SPAN><SPAN class="number token">17568456.88</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">'y'</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">2428431.352</SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">]</SPAN>
result <SPAN class="operator token">=</SPAN> project<SPAN class="punctuation token">(</SPAN>geometries<SPAN class="operator token">=</SPAN>input_geom<SPAN class="punctuation token">,</SPAN> in_sr<SPAN class="operator token">=</SPAN><SPAN class="number token">3857</SPAN><SPAN class="punctuation token">,</SPAN> out_sr<SPAN class="operator token">=</SPAN><SPAN class="number token">4326</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN><SPAN class="punctuation token">(</SPAN>result<SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>I could construct the request myself, but would rather use the API.
Any suggestions appreciated!
Cheers,
Mikie