Importing Modules
0

3 posts in this topic

Morning All,

Not sure if I am missing something - I have an action where I am trying to call an in-house module for folder creation on disk.

This requires an import of that module that I setup with sys.path.append or the like for Python3.8.

But it just keeps failing ?

Any thoughts ?

Thanks

Share this post


Link to post
Share on other sites

Hi @Rory , as long as the module you are importing are in PYTHONPATH it should work. 
If you have both python2 and 3 available be careful though as the variable is the same for both and can lead to issues.
If you still have issues, please send the relevant code to our support providing details about where the third party module is located and how has it been installed.
Cheers.
L.

Share this post


Link to post
Share on other sites

Thanks Lorenzo - 

Added the PYTHONPATH as a environment variable and the terminal python3 finds everything fine.

But I still get :-

2020-07-23 11:55:05,089 - ftrack_api.plugin.discover - WARNING - Failed to load plugin from "/Users/rory/Library/Application Support/ftrack-connect-plugins/ftrack-connect-example/hook/ftrack-connect-example_hook.py": No module named "..."

Is there a caching or something that needs to be cleared ?

Thanks,

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
0