# Ignition extension system.project.update

**URL:** <https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503>\
**Category:** Module Development\
**Tags:** ignition81, scripting\
**Created:** [January 28, 2025, 5:26pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503 "2025-01-28T17:26:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [January 28, 2025, 5:26pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/1 "2025-01-28T17:26:01Z")

</div>

I'm attempting to run a simple 'call route to update project' webdev module on ignition, using the ignition extensions:

I have installed the extension/confirmed it loads properly and that project update can be run from the script console.

My code for the route is below:

```python
def doPost(request, session):
	print(str(request))
	system.project.update()
	return {'response': 'good'}

```

And this is giving me 500s/not logging anything.

Is there something I should be calling differently with this?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 28, 2025, 5:28pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/2 "2025-01-28T17:28:56Z")

</div>

Try explicitly specifying the project.

When not specified, the function requires the current project to be defined in a ThreadLocal variable that isn't set in the context of a WebDev request handler.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [January 28, 2025, 5:29pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/3 "2025-01-28T17:29:32Z")

</div>

so that would be 'system.project = system.project.getProject([projectname])'?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 28, 2025, 5:30pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/4 "2025-01-28T17:30:05Z")

</div>

No, just:

```python
system.project.update('MyProject')

```

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [January 28, 2025, 5:30pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/5 "2025-01-28T17:30:26Z")

</div>

Ah, i see, thanks! will try.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [January 28, 2025, 5:31pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/6 "2025-01-28T17:31:06Z")

</div>

Still 500ing. Where would I find the print logs?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 28, 2025, 5:31pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/7 "2025-01-28T17:31:36Z")

</div>

In the wrapper.log files wherever the Ignition Gateway is installed.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [January 28, 2025, 5:32pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/8 "2025-01-28T17:32:24Z")

</div>

Yep, found it. it's saying that project has no update attribute even though script console project.update works -- should I just restart my designer?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 28, 2025, 5:33pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/9 "2025-01-28T17:33:48Z")

</div>

You may have screwed up your environment if you ran this snippet at any point and redefined `system.project`:

```python
system.project = system.project.getProject([projectname])

```

Restart the Gateway if that's the case... or maybe a project save or module restart would be enough, not sure.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [January 28, 2025, 5:36pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/10 "2025-01-28T17:36:52Z")

</div>

Restoring my gateway from a recent backup, then reinstalling the module.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 28, 2025, 5:37pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/11 "2025-01-28T17:37:45Z")

</div>

Restarting should have been more than enough. You just overwrote the `system.project` package if that snippet actually ran. It's not something that would survive a restart.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [January 28, 2025, 5:40pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/12 "2025-01-28T17:40:29Z")

</div>

system.project in webdev has a getProject member function but _not_ an update member function according to the webdev IDE. but system.project.update works in the script console.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [January 28, 2025, 5:43pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/13 "2025-01-28T17:43:08Z")

</div>

Do i need to do something special to bring update into the context of the webdev module, since it's in the designer context?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 28, 2025, 5:44pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/14 "2025-01-28T17:44:40Z")

</div>

WebDev handlers run in the Gateway, not the Designer. You're just writing the code in the Designer.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [January 28, 2025, 5:45pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/15 "2025-01-28T17:45:26Z")

</div>

Sure -- so will I be able to call system.project.update(projectname) there? Python doesn't seem to be recognizing that as a valid method.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 28, 2025, 5:47pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/16 "2025-01-28T17:47:19Z")

</div>

Ok I just took a closer look at this project because I've never actually seen or used it before.

It seems `system.project.update()` is only available in the Designer. It updates the Designer with the current version of the project on the Gateway.

I don't think this function does whatever is you were hoping it did, because it doesn't make sense to call from any other scope.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [January 28, 2025, 5:48pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/17 "2025-01-28T17:48:16Z")

</div>

Sure -- what i'm trying to do is trigger a call to the designer to update whenever the gateway restarts. I figured one way to do that would be via webdev, is there an alternative scripting mechanism I should use?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 28, 2025, 5:49pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/18 "2025-01-28T17:49:43Z")

</div>

You would need to do something like `system.util.sendMessage()` from your WebDev hook and send a message to every Designer instance where you tell it to run `system.project.update()`.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [January 28, 2025, 5:50pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/19 "2025-01-28T17:50:01Z")

</div>

Ah, I see, thank you.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [January 28, 2025, 5:51pm UTC](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503/20 "2025-01-28T17:51:22Z")

</div>

Where would I put that message handler? the script events seem focused on 'gateway receiving a script message' not 'designer receiving a script message'

[Next page](https://forum.inductiveautomation.com/t/ignition-extension-system-project-update/101503.md?page=2)
