Bad value substitution Error when starting shotgunEvents

I am getting the following error when Starting shotgunEvents:

./shotgunEventDaemon.py foreground

Traceback (most recent call last):
File “./shotgunEventDaemon.py”, line 1418, in
sys.exit(main())
File “./shotgunEventDaemon.py”, line 1377, in main
daemon = LinuxDaemon()
File “./shotgunEventDaemon.py”, line 1339, in init
self._engine = Engine(_getConfigPath())
File “./shotgunEventDaemon.py”, line 280, in init
self.config.getShotgunURL(),
File “./shotgunEventDaemon.py”, line 158, in getShotgunURL
return self.get(“shotgun”, “server”)
File “/usr/lib/python2.7/ConfigParser.py”, line 623, in get
return self._interpolate(section, option, value, d)
File “/usr/lib/python2.7/ConfigParser.py”, line 691, in _interpolate
self._interpolate_some(option, L, rawval, section, vars, 1)
File “/usr/lib/python2.7/ConfigParser.py”, line 723, in _interpolate_some
option, section, rest, var)
ConfigParser.InterpolationMissingOptionError: Bad value substitution:
section: [shotgun]
option : server
key : sg_ed_site_url
rawval :

2 Likes

Welcome to the community @mbk! Have you modified your shotgunEventDaemon.conf to have your site specific info (URL, script name/key to connect)? Judging by the error it’s not finding those variables to make the connection.

1 Like

Thanks for the quick response Brandon.

I updated the shotgunEventDaemon.conf and have bypassed that error. now Im getting "no module named shotgun_api3.

sudo ./shotgunEventDaemon.py foreground
Traceback (most recent call last):
File “./shotgunEventDaemon.py”, line 59, in
import shotgun_api3 as sg
ImportError: No module named shotgun_api3

The virtual env in shotgun is using the sg-jira-bridge/trigger/requirement.txt. I have also verified that shotgun_api3 is under site packages in venv thus the module is downloaded also confirmed that with pycharm

2 Likes

It seems like the shotgun_api3 module isn’t in your path when you’re starting up the daemon. If you start a shell in the same environment that the daemon is launching in, you should be able to test if you can import the module. If it’s unsuccessful, then you may need to re-examine how that particular environment is constructed.

Something you could try is to add a code.interact line in the daemon near the beginning:

import code
code.interact(local=dict(globals(), **locals()))

which will kick you to a shell when you run the daemon; you can then try to load the module and examine your env.

3 Likes

I was unable to import the it. For now I have installed the api module in my machine environment rather than venv and it has resolved the error

2 Likes

Glad you’ve got it resolved for now!

3 Likes