Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Import Python Module on Server problem

wonka1234
10 - Fireball

Hi,

 

I want to run my alteryx workflow on the server which has python inside.

This runs fine on my designer. But when I run on server it does not work.

I suspect i tis because the server cannot access my local files.

 

I have one line that access my local drive,

 

xlrd = Alteryx.importPythonModule("C:\\Users\\louis\\.conda\\envs\\Python\\Lib\\site-packages\\xlrd")

 

I get this error:

 "Unable to import module -- file does not exist ({})".format(path) 245 print(msg) --> 246 raise ImportError(msg) 247 # get containing directory and module name 248 self.containing_dir = os.path.dirname(self.path) ImportError: Unable to import module -- file does not exist (C:\Users\louis\.conda\envs\Python\Lib\site-packages\xlrd) (Tool Id: 1)

 

Is there anyway to alter this code so it imports the python module from the server successfully?

3 REPLIES 3
TimN
13 - Pulsar

Hi,

Your Server Admin has to add the Python Module to All Worker Nodes before you can run on the server.

 

Tim

PanPP
Alteryx Alumni (Retired)

Hi @wonka1234 

 

Make sure all python packages are installed on all machines associated with the Server machines.

If there is a run as user account, make sure this user also has access to the python module.

 

Hope this helps.

VijayAnaparthi
8 - Asteroid

I think your server doesn't have an access to that folder. Ask Alteryx admin to install xlrd package in server so that you can directly import that package instead of using above line or else get the access to that folder for your server.

Labels