Hi All. I am having a lot of issues with the python tool with Alteryx Designer. The workflow which I posted below is an analytic app that is grabbing an excel sheet from the users files to run through the workflow. The python tool reads the data in through "#1" and exports a formatted PowerPoint file that incorporates the data that was in the excel sheet. The workflow works perfect on my computer when run as an analytic app or just on desktop itself. However, when I share this app with other co workers, they get this error:
c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ayx\Package.py in installPackages(package, install_type, debug)
200 print(pip_install_result["msg"])
201 if not pip_install_result["success"]:
--> 202 raise pip_install_result["err"]
c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ayx\Utils.py in runSubprocess(args_list, debug)
118
119 try:
--> 120 result = subprocess.check_output(args_list, stderr=subprocess.STDOUT)
121 if debug:
122 print("[Subprocess success!]")
c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\subprocess.py in check_output(timeout, *popenargs, **kwargs)
409 kwargs['input'] = '' if kwargs.get('universal_newlines', False) else b''
410
--> 411 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
412 **kwargs).stdout
413
c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)
510 retcode = process.poll()
511 if check and retcode:
--> 512 raise CalledProcessError(retcode, process.args,
513 output=stdout, stderr=stderr)
514 return CompletedProcess(process.args, retcode, stdout, stderr)
CalledProcessError: Command '['c:\\program files\\alteryx\\bin\\miniconda3\\envs\\designerbasetools_venv\\python.exe', '-I', '-m', 'pip', 'install', 'python-pptx']' returned non-zero exit status 1.
Python (67): ---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-796bacf0a30c> in <module>
1 import pandas as pd
2 import numpy as np
----> 3 from pptx.util import Inches, Pt
4 import pandas as pd
5 import math
ModuleNotFoundError: No module named 'pptx'
Python (67): ---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-5-7f368c67b3ff> in <module>
7 subset_data = data.head(num_use_cases_to_display)
8
----> 9 slide1 = pr1.slides.add_slide(pr1.slide_layouts[8])
10 placeholders = slide1.placeholders
11
NameError: name 'pr1' is not defined
The PR1 is a template is being stored in a public s3 bucket which allows any user to access the formatted template in which the data gets entered in. It works fine on my computer as mentioned above but whenever someone else try's it on their computer they get this error above. Additionally I built this workflow initially on ADMIN in order for the python packages to install however I am able to run it just fine without using ADMIN.
My other problem is when I try to upload / save this workflow to server. It will fail uploading because of this error: (NameError: Name 'data' is not defined). When trying to publish it to server it doesn't recognize the that the python tool is reading the data as "#1". I attached a screenshot of the code I use that recognizes the data as #1 on my local machine but not when I try to puplish it to server it gives me that error above.