# Can't reopen the popup after clicking the OK button to close it

**URL:** <https://forum.inductiveautomation.com/t/cant-reopen-the-popup-after-clicking-the-ok-button-to-close-it/107688>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 23, 2025, 6:33pm UTC](https://forum.inductiveautomation.com/t/cant-reopen-the-popup-after-clicking-the-ok-button-to-close-it/107688 "2025-06-23T18:33:36Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [June 23, 2025, 7:53pm UTC](https://forum.inductiveautomation.com/t/cant-reopen-the-popup-after-clicking-the-ok-button-to-close-it/107688/4 "2025-06-23T19:53:15Z")

</div>

Post stack traces as pre-formatted text, not images, see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831). Just copy the stack trace as a whole and put it in the pre-formatted text block.

Neither of the scripts you gave us have 265 lines present, so its likely the source is elsewhere (maybe your message handler?). Looking at the error, it appears you forgot to close a pair of parentheses somewhere.

Additionally, you should NOT be importing anything within a function definition. You should never have to `import system`, its always available in all scripting contexts.

Also, the logger methods also accept a trace object as an additional argument. Don't stringify the traceback you get from your exception clauses. Example:

```python
except Exception as dt_err:
	        logger.error("Date/time parse failed: {} - datetime_str = '{}'".format(str(dt_err), datetime_str))

```

Should be

```python
except Exception as dt_err:
	        logger.errorf("Date/time parse failed for datetime_str '%s'", datetime_str, dt_err)

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/cant-reopen-the-popup-after-clicking-the-ok-button-to-close-it/107688)._
