Skip to content

Conversation

@Nimrod51
Copy link

@Nimrod51 Nimrod51 commented Nov 10, 2025

fix to resolve this error when creating an annotation on any line object:

AttributeError: 'QgsMapCanvasAnnotationItem' object has no attribute 'document'
Traceback (most recent call last):
File "/home//.local/share/QGIS/QGIS3/profiles/default/python/plugins/redLayer/redLayerModule.py", line 478, in canvasPressEvent
self.geoSketches[-1][4] = annotation.document().toPlainText()
^^^^^^^^^^^^^^^^^^^
AttributeError: 'QgsMapCanvasAnnotationItem' object has no attribute 'document'

Python-Version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0]
QGIS-Version: 3.44.4-Solothurn Solothurn, 108203c541e

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

Successfully merging this pull request may close these issues.

1 participant