Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with 32768 length field - OverflowError: argument 1 overflowed: value must be in the range -32768 to 32767 #13

Open
AlisterH opened this issue Jul 21, 2023 · 0 comments

Comments

@AlisterH
Copy link

AlisterH commented Jul 21, 2023

2023-07-21T23:36:37     WARNING    Traceback (most recent call last):
              File "C:\Users/alister/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\MemoryLayerSaver\memory_layer_saver.py", line 138, in save_data
              writer.write_layers(layers)
              File "C:\Users/alister/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\MemoryLayerSaver\writer.py", line 41, in write_layers
              self.write_layer(layer)
              File "C:\Users/alister/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\MemoryLayerSaver\writer.py", line 61, in write_layer
              ds.writeInt16(fld.length())
             OverflowError: argument 1 overflowed: value must be in the range -32768 to 32767

The attached project can be used to reproduce.

  • Open the project.
  • Save the QGIS project - there is no problem.
  • Select some of the features in the layer
  • Edit>copy features
  • Edit>paste features as>temporary scratch layer
  • Save the project and the memory layer saver plugin will generate the error above.
  • Edit the memory layer and delete the titles column.
  • Save the project - there is no problem.

test memory layer saver.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant