Again on cursor position script it throws back an error not always working

So it appears even though i select the first line the script does not consistently work.

“evn” Have provided a script which seems to work only sometimes and now as i tryed on 5.2.6 version it doesn’t show up the position counters.

the following is the error:
" AttributeError: ‘NoneType’ object has no attribute ‘findChild’

In file: /home/magdi/mimilaptop/tar2/Programs/CursorCoordinateScript.py

In function: at line: 9. Line with error:

wobj = pobj.findChild(QOpenGLWidget)"

You should add a link to the script in question, or at least name it so it can be found.
Also, currently you (and maybe perhaps @evn) are the only one who knows what stands in this first line of this unknown script.
This is the old story, please always think about the fact that we can not read minds, do not stand beside you and that our magic crystal ball is currently at service, and we do not expect it back from service before the end of this millennium …

I’m curious what @Takiro is writing on this …

Michelist

What script, what even is this about?

looks like pobj never got assigned any value (except None apparently)

This script: Document pixel position under cursor position

The reason why pobj is None is because there is no widget with the name “view_0” in the object tree. This happens because “view_0” was already closed. The first document opened on application startup is “view_0”. When the document is closed, “view_0” no longer exists. The second document will have “view_1” and the third document will have “view_2” and so on.

The script was a proof of concept. This code should be more robust.