Sorry for the addition, but regarding the issue with SetField, I just had the same error with the inputs<br>SetField(&#39;STRUCT_DAMAGE_fraction&#39;, 0.346734256639)<br><br>To repeat, this works on every standard Ubuntu installation I have used (10.04, 10.10, 11.04). However, after installing qgis 1.7 on Ubuntu 11.04 this error keeps happening in our code. I don&#39;t know how to find out what version of org we are using.<br>
<br>Please let me know how to work around this or if there is a patch you can apply.<br><br>Cheers and thanks<br>Ole <br><br><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Ole Nielsen</b> <span dir="ltr">&lt;<a href="mailto:ole.moller.nielsen@gmail.com">ole.moller.nielsen@gmail.com</a>&gt;</span><br>
Date: Thu, Sep 1, 2011 at 4:04 PM<br>Subject: NotImplementedError: Wrong number of arguments for overloaded function &#39;Feature_SetField&#39;.<br>To: <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
Cc: Ariel Nunez &lt;<a href="mailto:ingenieroariel@gmail.com">ingenieroariel@gmail.com</a>&gt;, Ted Dunstone &lt;<a href="mailto:ted@biometix.com">ted@biometix.com</a>&gt;<br><br><br>Developing on a code which relies on ogr.py and that has been running for a while on Ubuntu 10.04, 10.10 and 11.04 I saw for the first time today the error <br>
<br>....<br>ERROR 1: No such field: &#39;CONTENTS_DAMAGE_fraction&#39;<br>
ERROR 1: No such field: &#39;STRUCT_INUNDATED&#39;<br>ERROR 1: No such field: &#39;STRUCT_LOSS_AUD&#39;<br>ERROR 1: No such field: &#39;CONTENTS_LOSS_AUD&#39;<br>ERROR 1: No such field: &#39;PEOPLE_AFFECTED&#39;<br>.....<br>

  File &quot;/home/nielso/dev/riab/impact/storage/vector.py&quot;, line 426, in write_to_file<br>    feature.SetField(name, data[i][name])<br>  File &quot;/usr/lib/python2.7/dist-packages/osgeo/ogr.py&quot;, line 2184, in SetField<br>

    return _ogr.Feature_SetField(self, *args)<br>NotImplementedError: Wrong number of arguments for overloaded function &#39;Feature_SetField&#39;.<br>  Possible C/C++ prototypes are:<br>    SetField(OGRFeatureShadow *,int,char const *)<br>

    SetField(OGRFeatureShadow *,char const *,char const *)<br>    SetField(OGRFeatureShadow *,int,int)<br>    SetField(OGRFeatureShadow *,char const *,int)<br>    SetField(OGRFeatureShadow *,int,double)<br>    SetField(OGRFeatureShadow *,char const *,double)<br>

    SetField(OGRFeatureShadow *,int,int,int,int,int,int,int,int)<br>    SetField(OGRFeatureShadow *,char const *,int,int,int,int,int,int,int)<br><br><br><br>This happened after I (as an unrelated act) installed qgis 1.7 so I am guessing GDAL got upgraded as well.<br>

The arguments to SetField in this case are: SetField(&#39;MMI&#39;, nan)<br>Types are <br>&#39;MMI&#39; &lt;type &#39;str&#39;&gt;<br>nan &lt;type &#39;float&#39;&gt;<br><br>So does this mean that nan used to be supported and no longer is?<br>

Or is it me doing something wrong.<br><br><br><br>I have seen references to this issue at <br><br><a href="http://osgeo-org.1803224.n2.nabble.com/gdal-dev-Proposed-UTF-8-SWIG-Changes-td5575272.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/gdal-dev-Proposed-UTF-8-SWIG-Changes-td5575272.html</a><br>

<a href="http://lists.osgeo.org/pipermail/gdal-dev/2010-September/026156.html" target="_blank">http://lists.osgeo.org/pipermail/gdal-dev/2010-September/026156.html</a><br><br>but they seem to be more concerned with defining typemaps in the C libraries. What I need to know is how to modify my <br>

Python code so that this runs again on all relevant gdal versions.<br><br>Can anyone help, please?<br><br>Many thanks<br><font color="#888888">Ole Nielsen<br><br>
</font></div><br>