Updated QGIS plugin to 0.1.1 – sending now fails from a previously okay layer

When trying to publish a vector layer of a geopackage poly table:

The publish simply fails:

2022-04-05T16:36:55     CRITICAL    Error converting geometry: 'QgsGeometry' object has no attribute 'exteriorRing'
2022-04-05T16:36:55     CRITICAL    Error converting geometry: 'QgsGeometry' object has no attribute 'exteriorRing'
2022-04-05T16:36:55     CRITICAL    Error converting geometry: 'QgsGeometry' object has no attribute 'exteriorRing'
2022-04-05T16:36:55     CRITICAL    Error converting geometry: 'QgsGeometry' object has no attribute 'exteriorRing'
2022-04-05T16:36:55     CRITICAL    Error converting geometry: 'QgsGeometry' object has no attribute 'exteriorRing'
2022-04-05T16:36:55     CRITICAL    Error converting geometry: 'QgsGeometry' object has no attribute 'exteriorRing'
2022-04-05T16:36:55     CRITICAL    Error converting geometry: 'QgsGeometry' object has no attribute 'exteriorRing'
2022-04-05T16:36:55     CRITICAL    Error converting geometry: 'QgsGeometry' object has no attribute 'exteriorRing'
2022-04-05T16:36:55     CRITICAL    Error converting geometry: 'QgsGeometry' object has no attribute 'exteriorRing'
2022-04-05T16:36:56     CRITICAL    Error sending data

curiously the python error seems to vary from either failing at point conversion

 warning:/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/specklepy/objects/base.py:211: ResourceWarning: unclosed 
              super().__setattr__(name, value)
             
             traceback: File "/Users/jonathonbroughton/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/speckle-qgis/speckle_qgis.py", line 262, in onSendButtonClicked
              base_obj.layers = convertSelectedLayers(layers, selectedLayerNames, projectCRS, project)
              File "/Users/jonathonbroughton/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/speckle-qgis/speckle/converter/layers/__init__.py", line 39, in convertSelectedLayers
              result.append(layerToSpeckle(layer, projectCRS, project))
              File "/Users/jonathonbroughton/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/speckle-qgis/speckle/converter/layers/__init__.py", line 60, in layerToSpeckle
              b = featureToSpeckle(fieldnames, f, crs, projectCRS, project)
              File "/Users/jonathonbroughton/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/speckle-qgis/speckle/converter/layers/feature.py", line 24, in featureToSpeckle
              geom = convertToSpeckle(f)
              File "/Users/jonathonbroughton/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/speckle-qgis/speckle/converter/geometry/__init__.py", line 33, in convertToSpeckle
              return pointToSpeckle(geom.constGet())
              File "/Users/jonathonbroughton/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/speckle-qgis/speckle/converter/geometry/point.py", line 19, in pointToSpeckle
              specklePoint.x = x
              File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/specklepy/objects/base.py", line 211, in __setattr__
              super().__setattr__(name, value)

to graphql errors

warning:/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/graphql/language/ast.py:329: ResourceWarning: unclosed 
              value = kwargs.get(key)
             
             traceback: File "/Users/jonathonbroughton/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/speckle-qgis/speckle_qgis.py", line 281, in onSendButtonClicked
              client.stream.get(streamId)
              File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/specklepy/api/resources/stream.py", line 85, in get
              return self.make_request(query=query, params=params, return_type="stream")
              File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/specklepy/api/resource.py", line 62, in make_request
              response = self.client.execute(query, variable_values=params)
              File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/gql/client.py", line 193, in execute
              return self.execute_sync(document, *args, **kwargs)
              File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/gql/client.py", line 137, in execute_sync
              return session.execute(document, *args, **kwargs)
              File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/gql/client.py", line 435, in execute
              result = self._execute(
              File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/gql/client.py", line 356, in _execute
              result = self.transport.execute(
              File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/gql/transport/requests.py", line 135, in execute
              query_str = print_ast(document)
              File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/graphql/language/printer.py", line 49, in print_ast
              return visit(ast, PrintAstVisitor())
              File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/graphql/language/visitor.py", line 233, in visit
              node = copy(node)
              File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/copy.py", line 84, in copy
              return copier(x)
              File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/graphql/language/ast.py", line 365, in __copy__
              return self.__class__(**{key: getattr(self, key) for key in self.keys})
              File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/graphql/language/ast.py", line 329, in __init__
              value = kwargs.get(key)

What can I do to help debug this?

Hi @jsdbroughton!

@Kateryna has been working on some changes in QGIS that we’re hoping to merge in today and publish a new version.

I think these new changes may help with how we’re dealing with polygons, leading to this being fixed. Although I’m not 100% sure, would be great if you could share with us the data layer you’re trying to send so we can debug on our side too.

Anyway, I’ll let you know once we’ve merged this into main in case you want to give it a go sooner (as the QGIS marketplace does take a bit to approve things at times)

1 Like

For reference just the Geopackage (300kb)

1 Like

Hey! I guess this error should disappear with the fix coming later this week, but could you also attach the files linked to vector layers, so we can test it with your specific project? Thanks!

1 Like

The geopackage above has each vector layer I was testing. I was only using qgis with no mods to each

Hey @jsdbroughton ! Sorry for a delayed reply, the error is solved and Speckle version on QGIS Marketplace will be updated asap:)

1 Like

Speckle-QGIS 0.2.0 is out, enjoy!
P.S. Updating the plugin only worked after restarting QGIS as well

2 Likes

Cool! (I probably should have anonymised the example file :D)

3 Likes