Bootstrap SGTK - ModuleNotFoundError

Hi there,

I’m trying to bootrstrap tk-shell to access tk.templates command outside of an engine.
I’m using a distributed config.

When following this doc (part 4), and importing sgtk v0.19.18 from an install folder I got this error:

Traceback (most recent call last):
  File ".../_wip/", line 9, in <module>
    import sgtk
  File "L:/_tech/sgtk_sandbox/install/core/python\sgtk\", line 16, in <module>
    import tank
  File "L:/_tech/sgtk_sandbox/install/core/python\tank\", line 58, in <module>
    from . import authentication
  File "L:/_tech/sgtk_sandbox/install/core/python\tank\authentication\", line 33, in <module>
    from .shotgun_authenticator import ShotgunAuthenticator
  File "L:/_tech/sgtk_sandbox/install/core/python\tank\authentication\", line 13, in <module>
    from .sso_saml2 import (
  File "L:/_tech/sgtk_sandbox/install/core/python\tank\authentication\sso_saml2\", line 15, in <module>
    from .core.errors import (  # noqa
  File "L:/_tech/sgtk_sandbox/install/core/python\tank\authentication\sso_saml2\core\", line 15, in <module>
    from .sso_saml2_core import (  # noqa
  File "L:/_tech/sgtk_sandbox/install/core/python\tank\authentication\sso_saml2\core\", line 19, in <module>
    from Cookie import SimpleCookie
ModuleNotFoundError: No module named 'Cookie'

Can I have a bit of help?

Can I have some infos on the basic setup used for Bootstrapping?

As I understand the problem, as the session’s PYTHONPATH does not point to a package of Cookie, I can’t run the files which need this dependency in SGTK.

Am I supposed to install some python packages and modify PYTHONPATH on all our workstations for bootstrap to work? If so, can I have a list of all the packages SGTK depends on?

Don’t have an answer, but you’re not supposed to have to install modules and add them to the path manually. I wonder if this is a Python 3 issue.

I can tell you that the steps described in that page work in Windows 10 and Linux with Python 2.7 and Toolkit 0.19.11. AFAIK sgtk doesn’t depend on anything.

If you’re using Python 3 that might indeed be the issue. Python 2.7 does have a Cookie module, but 3.x does not.


Yep! I can confirm @vtrvtr : it works without any problem with Python27. Thanks a lot for your response!
I’ll be using this python version then.

Are there plans to allow bootrstrapping on Py37?

1 Like