# Python Job does not update variable

**URL:** <https://matillioncommunity.discourse.group/t/python-job-does-not-update-variable/2237>\
**Category:** Matillion ETL\
**Created:** [July 3, 2023, 8:28pm UTC](https://matillioncommunity.discourse.group/t/python-job-does-not-update-variable/2237 "2023-07-03T20:28:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bobec](https://sea2.discourse-cdn.com/flex002/user_avatar/matillioncommunity.discourse.group/bobec/32/50_2.png) [@Bobec](https://matillioncommunity.discourse.group/u/Bobec)\
**Post date:** [July 3, 2023, 8:28pm UTC](https://matillioncommunity.discourse.group/t/python-job-does-not-update-variable/2237/1 "2023-07-03T20:28:31Z")

</div>

I have this python script:

print(HAIMENG)

context.updateVariable(HAIMENG, '123')

print(HAIMENG)

&nbsp;

However in the terminal I get:

&nbsp;

20230101

20230101

Script duration: 48.8s.

&nbsp;

How can I debug this issue? Thank you.

---

<div class="post-metadata">

**Author:** ![Bobec](https://sea2.discourse-cdn.com/flex002/user_avatar/matillioncommunity.discourse.group/bobec/32/50_2.png) [@Bobec](https://matillioncommunity.discourse.group/u/Bobec)\
**Post date:** [July 3, 2023, 8:40pm UTC](https://matillioncommunity.discourse.group/t/python-job-does-not-update-variable/2237/2 "2023-07-03T20:40:26Z")

</div>

Nevermind, the solution was to refer to the variable as a string:

print(HAIMENG)

context.updateVariable('HAIMENG', '123')

print(HAIMENG)
