# IndexException whenever using PyArgParser

**URL:** <https://forum.inductiveautomation.com/t/indexexception-whenever-using-pyargparser/62692>\
**Category:** Module Development\
**Created:** [August 4, 2022, 6:05pm UTC](https://forum.inductiveautomation.com/t/indexexception-whenever-using-pyargparser/62692 "2022-08-04T18:05:10Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [August 4, 2022, 9:38pm UTC](https://forum.inductiveautomation.com/t/indexexception-whenever-using-pyargparser/62692/9 "2022-08-04T21:38:45Z")

</div>

So, per [another thread](https://forum.inductiveautomation.com/t/scriptcontext-through-client-scope-does-not-return-project-but-does-in-perspective/62604/22) on here I am actually providing a project name in the constructor of my `GatewayScriptModule`, because ultimately this script is return project level resources.

In both of these examples I lose that parameter in my constructor, so is there another way to get it other than pulling it out of python locals when the script managers are initialized?

> [@paul-griffith](#):
>
> If so, you may want to (for simplicity) have something like this:

And in regards to Pauls example, when in the concrete `getConfig` method, you call `getConfigImpl`, it will end up calling the implementation of it, which calls back to `rpc.getConfigImpl`, which ends up in an endless loop of implementation calls. At what point do I actually end up reading my project resource through the implemented function?

---

_[View the full topic](https://forum.inductiveautomation.com/t/indexexception-whenever-using-pyargparser/62692)._
