Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Python Tool on Server/Gallery - periodically cannot find module

mcha54
8 - Asteroid

Hi there! Has anyone seen this before? We have workflows that use a custom Python tool with the same code. They are run at different times.

Periodially we get this error on the Server, but it's confirmed that the package is installed on the Server.

Some times the workflow works and is successful, other times its not.

 

from boxsdk.object.folder import Folder ModuleNotFoundError: No module named 'boxsdk' 

 

Any insight is appreciated!

5 REPLIES 5
KGT
13 - Pulsar

Is it the same workflow that periodically fails, or is it a single workflow that fails everytime?

 

The error message indicates that it can't find the Package, so I'm curious if that's installed under a user or similar and so not available to whoever is running this.

 

If this truly is periodically failing and not related to a certain run user or workflow, then best option I can suggest is a connection being blocked to pypi, but that command shouldn't reach out directly...

apathetichell
20 - Arcturus

My guess --- OP has multiple worker nodes. Only some machines have the Python Box package installed. The solution is ---> 1) go through the logs to find out which machines were running the error flow. 2) log onto machine (or use cli/scripts) to install the required python packages as admin. 3) test. re-run.

 

Also --- to confirm the package may be on the server --- but the python environment is on the actual worker machine --- not on Server so if the actual worker machine doesn't have the package --- this will cause an error.

KGT
13 - Pulsar

Good call! Didn't even think about multiple worker nodes... I'm too far out of practice with server setup... That makes more sense than the running user and would be a higher priority to check!

dreldrel
8 - Asteroid

If you have multiple nodes, you need to ensure that all nodes have the library installed. Maybe it's a good chance to list the library installed on each machine and make sure they are synced moving forward

evelyn69mohr
5 - Atom

This issue suggests an intermittent environment problem, likely related to Python's path/virtual environment not being consistently activated or available during every workflow execution, despite the boxsdk package being installed on the server. Try ensuring the workflow explicitly uses the correct Python interpreter or virtual environment where the package is installed.