Bug report #17524

Windows: cannot save updates in csv file opened as OGR vector layer

Added by Olga Grabek about 7 years ago. Updated almost 6 years ago.

Status:Feedback
Priority:Normal
Assignee:-
Category:Vectors
Affected QGIS version:master Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:25421

Description

Steps to reproduce:

1. Choose Add vector layer option
2. Load attached csv file
3. When file is loaded as a layer, choose Open Attribute Table
4. Choose Toggle editing mode
5. Choose Save Edits

The error is thrown: "OGR error syncing to disk: Cannot rename files"

It seems to be problem only on Windows (tested on two devices with Windows 10). On Mac everything seems to be working.

package_18.csv Magnifier - Testing file (1.67 KB) Olga Grabek, 2017-11-22 06:48 PM

History

#1 Updated by Giovanni Manghi about 7 years ago

  • Status changed from Open to Feedback

Please update to 2.18.14 (the new LTR release) and try again. Thanks!

#2 Updated by Olga Grabek about 7 years ago

  • Assignee set to Giovanni Allegri

Unfortunately, the issue still exists in 2.18.14. When I change any attribute in the _ Attribute Table_ and click Save Edits I get this error. The same issue is also when I try to add a new feature to the layer. I can only remove features from layer without errors from OGR.

I'm not sure this is helpful but when I opened Log Messages Panel OGR reports:

Unbalanced call to leaveUpdateMode() w.r.t. enterUpdateMode()

#3 Updated by Giovanni Manghi about 7 years ago

  • Assignee deleted (Giovanni Allegri)

Cannot replicate here with the data you provided.

#4 Updated by Olga Grabek about 7 years ago

Giovanni Manghi wrote:

Cannot replicate here with the data you provided

Thanks for a response. Did you try to reproduce it on a Window's machine ? This is strange that you can't reproduce it, as we are getting the same error on four different machines with Windows OS (2xWindows 10, 1xWindows 7 and 1xWindows Server). Be aware that the error is thrown when you change any attribute in Attribute table and then try to SAVE changes.

#5 Updated by Olga Grabek about 7 years ago

  • Assignee set to Giovanni Manghi

#6 Updated by Giovanni Manghi about 7 years ago

Olga Grabek wrote:

Be aware that the error is thrown when you change any attribute in Attribute table and then try to SAVE changes.

this means adding/deleting/editing a column or changing its content?

#7 Updated by Giovanni Manghi about 7 years ago

  • Assignee deleted (Giovanni Manghi)

#8 Updated by Olga Grabek about 7 years ago

It means changing a content in any column.

#9 Updated by Richard Duivenvoorde about 7 years ago

  • Subject changed from Cannot save updates in csv file openned as vactor layer to Cannot save updates in csv file opened as OGR vector layer

Confirmed here with 2.18.4 AND master on Windows10.

As said: on Linux it is not a problem, it just works.

Seems an OGR - Windows problem (when opening with as txt delimited file, editing is not possible)

#10 Updated by Giovanni Manghi about 7 years ago

  • Subject changed from Cannot save updates in csv file opened as OGR vector layer to Windows: cannot save updates in csv file opened as OGR vector layer
  • Status changed from Feedback to Open
  • Affected QGIS version changed from 2.14.14 to master
  • Operating System changed from Windows 10 to Windows

Seems an OGR - Windows problem (when opening with as txt delimited file, editing is not possible)

correct, it is problem on Windows. If the CSV is added as vector is editable but on save the reported error is thrown. To add insult to injury if the table covers the message bar the user don't see the error and when toggling editing the unsaved values are sticking in the table giving the sensation that edits went well...

Confirmed also on master.

#11 Updated by Giovanni Manghi about 7 years ago

  • Category changed from Attribute table to Vectors

#12 Updated by Giovanni Manghi almost 6 years ago

  • Status changed from Open to Feedback

Please check if this issue is still valid on QGIS 3.4.5 or 3.6.

Also available in: Atom PDF