<div dir="ltr"><div><div><div><div><div><div><div>Hi all,<br><br></div>Some users reported a bug in DbManager. When you connect to a database, and then click on one layer, the plugin tries to fetch information about the layer and its indexes. <br><br>The method "getTableIndexes" situated in line 371 of the file "db_manager/db_plugins/spatialite/connector.py"expects to get 3 fields from the sqlite method "PRAGMA index_list" <br><br></div>In recent version of SQLite, though, this method now returns 5 fields, for example<br><br>sqlite> pragma index_list(geo_parcelle);<br>0|idx_geo_parcelle_ogc_fid|0|c|0<br>1|geo_parcelle_voie_idx|0|c|0<br>2|geo_parcelle_comptecommunal_idx|0|c|0<br><br><br></div>This leads to a Python error : <br><br>

<p style="margin:0px;text-indent:0px">                    File "/usr/share/qgis/python/plugins/db_manager/db_plugins/spatialite/connector.py", line 371, in getTableIndexes</p>
<p style="margin:0px;text-indent:0px">                      num, name, unique = idx</p>
<p style="margin:0px;text-indent:0px">                  ValueError: too many values to unpack</p><p style="margin:0px;text-indent:0px"><br></p><p>A change has been made in sqlite code, see <a class="" href="https://github.com/mackyle/sqlite/commit/efa3207797a6ff4eb6a514fad5c99cf67c056492">https://github.com/mackyle/sqlite/commit/efa3207797a6ff4eb6a514fad5c99cf67c056492</a></p>


        <p>Then a bug fix has been added for retro-compatibility if index_info , but not for index_list<br></p><p><a href="https://github.com/mackyle/sqlite/commit/53555d6da78e52a430b1884b5971fef33e9ccca4">https://github.com/mackyle/sqlite/commit/53555d6da78e52a430b1884b5971fef33e9ccca4</a><br></p><p>We need to backport a bug fix, if it is done in DbManager</p><br></div>I have opened a bug in the hub, since I have not been able to find a corresponding issue.<br><a href="http://hub.qgis.org/issues/14110">http://hub.qgis.org/issues/14110</a><br><br></div>I will try to debug it quicky, or have someone already worked on it ?<br><br></div>Cheers<br></div>MichaĆ«l<br></div>