# Problem with tag Value Events - Value Change

**URL:** <https://forum.inductiveautomation.com/t/problem-with-tag-value-events-value-change/61985>\
**Category:** Ignition\
**Tags:** perspective, ignition81, database\
**Created:** [July 17, 2022, 9:15am UTC](https://forum.inductiveautomation.com/t/problem-with-tag-value-events-value-change/61985 "2022-07-17T09:15:57Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 17, 2022, 3:44pm UTC](https://forum.inductiveautomation.com/t/problem-with-tag-value-events-value-change/61985/7 "2022-07-17T15:44:50Z")

</div>

In gateway scope, the `database` connection name argument to [runQuery](https://docs.inductiveautomation.com/display/DOC81/system.db.runQuery) is required.

Your `except:` can inspect/print/log the actual exception information via python's `sys` and/or `traceback` modules, though you will need a separate `except:` clause to capture java errors. See this example:

> [@readBlocking and timeout exception](https://forum.inductiveautomation.com/t/readblocking-and-timeout-exception/38921/3):
>
> If the error was a direct throw of that TimeoutException, your except clause would work. But it is being wrapped in some other throwable (the TimeoutException add as the cause). I recommend this structure for this case: import java.lang.Throwable def someFunction(): try: system.tag.writeBlocking(.....) except java.lang.Throwable, t: # do something, including looking at t.cause except Exception, e: # do something with other python problems.

Note that any uncaught errors or logging or printing from gateway scope show up in the gateway log, not in the designer's console or client console. Printing, in particular, only goes to the text-format wrapper log.

{ Have you gone through the lessons in IA's [Inductive University](https://inductiveuniversity.com/courses/ignition-overview/8.1) ? That would cover many of the basic concepts of Ignition and Python that are tripping you up. }

---

_[View the full topic](https://forum.inductiveautomation.com/t/problem-with-tag-value-events-value-change/61985)._
