Skip to content

fix annotation-document error when creating line#45

Open
Nimrod51 wants to merge 1 commit into
enricofer:masterfrom
Nimrod51:annotation-document-fix
Open

fix annotation-document error when creating line#45
Nimrod51 wants to merge 1 commit into
enricofer:masterfrom
Nimrod51:annotation-document-fix

Conversation

@Nimrod51

@Nimrod51 Nimrod51 commented Nov 10, 2025

Copy link
Copy Markdown

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