Open Popup From Session Startup Script

Hello,

Is it possible to open a popup from a Session Startup script? When I try, I get the error message stating:

Error running session.onStartup(session): … No perspective page attached to this thread.

I checked if a page exists during the run of the startup script:

logger.info('page id ' + str(session.getPage(session.props.id)))

Which returns None:

image

Is there a work around to this? Thank you.

No, that event runs before the page exists.

I recommend using a shared docked view with a startup script to do such things.

If you have any menu or dock then put it on the startup event of that object and it’ll work.