<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi people:<div>I'm trying to update an table sqlite not geometric but the update does not take place.</div><div><br></div><div>this is my code:</div><div><br></div><div><div>def convert_table(self):</div><div>        cfg_rel_path = os.path.join(os.sep, 'HFF_DB_folder', 'config.cfg')</div><div>        file_path = '{}{}'.format(self.HOME, cfg_rel_path)</div><div>        conf = open(file_path, "r")</div><div>        con_sett = conf.read()</div><div>        conf.close()</div><div>        settings = Settings(con_sett)</div><div>        settings.set_configuration()</div><div>        if settings.SERVER == 'sqlite':</div><div>            sqliteDB_path = os.path.join(os.sep, 'HFF_DB_folder', settings.DATABASE)</div><div>            db_file_path = '{}{}'.format(self.HOME, sqliteDB_path)</div><div>            uri = QgsDataSourceUri()</div><div>            uri.setDatabase(db_file_path)</div><div>            uri.setDataSource('','eamena_table', None,'')</div><div>            layerEamena=QgsVectorLayer(uri.uri(), 'eamena_table', 'spatialite')</div><div>            QgsProject.instance().addMapLayers([layerEamena], True)</div><div>            layer =  QgsProject.instance().mapLayersByName('eamena_table')[0]</div><div>            with edit(layer):</div><div>                for feat in layer.getFeatures():</div><div>                    a=str(feat['assessment_investigator_actor'])</div><div>                    if "[['" not in a and a!='NULL':</div><div>                        t=a.replace(a[0],"[['"+a[0]).replace("|","'], ['").replace(a[-1],a[-1]+"']]") </div><div>            layer.updateFeature(feat)        </div><div>        QgsProject.instance().removeMapLayer(<a href="http://layer.id">layer.id</a>())</div><div><br></div><div>If I print the results it's ok but into table doesn't update.</div><div>Some one has some suggestions?</div><div><br></div><div>Best<br>E</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Enzo Cocca PhD</div><div dir="ltr">in "Science and Technology for Archaeology and Cultural Heritage"</div><div dir="ltr"><br></div><div dir="ltr"><div style="font:400 13.33px/19.99px Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;overflow:visible;text-decoration:none;word-spacing:0px;white-space:normal;background-color:transparent"><div style="font:400 13.33px/19.99px Arial,Helvetica,sans-serif;overflow:visible"><span style="font:400 13.33px/19.99px Arial,Helvetica,sans-serif;overflow:visible">ISMEO</span></div><div style="font:400 13.33px/19.99px Arial,Helvetica,sans-serif;overflow:visible">International Association of Mediterranean and Oriental Studies </div></div><br></div><div dir="ltr"><img width="200" height="75" style="font: 400 13.33px / 19.99px Arial, Helvetica, sans-serif; text-align: left; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: visible; text-decoration: none; word-spacing: 0px; white-space: normal; background-color: transparent;" src="https://docs.google.com/uc?export=download&id=1ho_PBK4C-4cl8Ubqw4oyvusZOhM5P92l&revid=0B2EWPB0itz-iQ3dwZVBaaTVKcEN4VUpwa09scDNRNmNvQkw0PQ"></div><div dir="ltr"><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><br><div>mail: <a href="mailto:enzo.ccc@gmail.com" target="_blank">enzo.ccc@gmail.com</a></div><div>cell: +393495087014</div><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div>