Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

Python tool Interactive module not working

lk81
7 - Meteor

Hello everyone,

 

An user wants to run a Python code in Alteryx and we figured out he could do it in a Python tool. Python is installed on the machine, but when I click on Interactive module I see a grey area where I cannot write a code. When I click on Production I have a blank sheet but I cannot input any text. 

 

What am I doing wrong?

 

Thanks.

 

 

python installation.PNGPython Interactive.PNG

4 REPLIES 4
TrevorS
Moderator
Moderator

Hello @lk81 
Thank you for posting to the Community!
I think the issue is the blank sheet you have connected to the Python tool itself.
Please refer to the Python Help documents and the Tool Mastery | Python to get started.

 

Thanks!
TrevorS

Community Moderator
jlabadorf
5 - Atom

I'm having the same issue. Both instruction sets @TrevorS provided assume you are already connected, which is the problem. If I try to run the example I get the following error:

Error: Python (69): Traceback (most recent call last):
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\nbconvert\preprocessors\execute.py", line 249, in _kernel_manager_class_default
from jupyter_client import KernelManager
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\jupyter_client\__init__.py", line 4, in <module>
from .connect import *
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\jupyter_client\connect.py", line 21, in <module>
import zmq
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\zmq\__init__.py", line 50, in <module>
from zmq import backend
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: cannot import name 'constants'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Program Files\Alteryx\bin\Miniconda3\envs\JupyterTool_vEnv\Scripts\jupyter-nbconvert.EXE\__main__.py", line 7, in <module>
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\jupyter_core\application.py", line 270, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\traitlets\config\application.py", line 664, in launch_instance
app.start()
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\nbconvert\nbconvertapp.py", line 340, in start
self.convert_notebooks()
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\nbconvert\nbconvertapp.py", line 510, in convert_notebooks
self.convert_single_notebook(notebook_filename)
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\nbconvert\nbconvertapp.py", line 481, in convert_single_notebook
output, resources = self.export_single_notebook(notebook_filename, resources, input_buffer=input_buffer)
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\nbconvert\nbconvertapp.py", line 410, in export_single_notebook
output, resources = self.exporter.from_filename(notebook_filename, resources=resources)
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\nbconvert\exporters\exporter.py", line 179, in from_filename
return self.from_file(f, resources=resources, **kw)
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\nbconvert\exporters\exporter.py", line 197, in from_file
return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw)
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\nbconvert\exporters\notebook.py", line 32, in from_notebook_node
nb_copy, resources = super(NotebookExporter, self).from_notebook_node(nb, resources, **kw)
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\nbconvert\exporters\exporter.py", line 139, in from_notebook_node
nb_copy, resources = self._preprocess(nb_copy, resources)
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\nbconvert\exporters\exporter.py", line 316, in _preprocess
nbc, resc = preprocessor(nbc, resc)
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\nbconvert\preprocessors\base.py", line 47, in __call__
return self.preprocess(nb, resources)
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\nbconvert\preprocessors\execute.py", line 403, in preprocess
with self.setup_preprocessor(nb, resources, km=km):
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\contextlib.py", line 81, in __enter__
return next(self.gen)
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\nbconvert\preprocessors\execute.py", line 345, in setup_preprocessor
self.km, self.kc = self.start_new_kernel(**kwargs)
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\nbconvert\preprocessors\execute.py", line 287, in start_new_kernel
km = self.kernel_manager_class(kernel_name=self.kernel_name,
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\traitlets\traitlets.py", line 556, in __get__
return self.get(obj, cls)
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\traitlets\traitlets.py", line 535, in get
value = self._validate(obj, dynamic_default())
File "C:\Users\jlabado1\AppData\Roaming\Python\Python36\site-packages\nbconvert\preprocessors\execute.py", line 251, in _kernel_manager_class_default
raise ImportError("`nbconvert --execute` requires the jupyter_client package: `pip install jupyter_client`")
ImportError: `nbconvert --execute` requires the jupyter_client package: `pip install jupyter_client`

 

Jupyter_client is already installed on my machine.

lk81
7 - Meteor

@jlabadorf 

We had to alter the pac file for Alteryx so that requests could go through to our server rather than being forwarded to our proxy server.

 

A Proxy Auto-Configuration (PAC) file is a JavaScript function that determines whether web browser requests (HTTP, HTTPS, and FTP) go directly to the destination or are forwarded to a web proxy server.

 

Hope this helps.

jlabadorf
5 - Atom

Thanks! I was able to get it working by installing a admin copy.

Labels