Alteryx Designer Desktop Discussions

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

Python Tool Error

Sagarloknath
Météoroïde

Hello,

 

I'm facing an issue in the Python Tool while executing the Workflow (Alteryx Designer - 2021.4v). Initially the workflow was executing without any errors but since 3 days it's throwing an error.

 

Please find the error code below.

 

 

Error: Python (45): Traceback (most recent call last):
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ipython_genutils\ipstruct.py", line 132, in __getattr__
result = self[key]
KeyError: 'cells'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Program Files\Alteryx\bin\Miniconda3\envs\DesignerBaseTools_venv\Scripts\jupyter-nbconvert.EXE\__main__.py", line 7, in <module>
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\jupyter_core\application.py", line 270, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\traitlets\config\application.py", line 658, in launch_instance
app.start()
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\nbconvert\nbconvertapp.py", line 338, in start
self.convert_notebooks()
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\nbconvert\nbconvertapp.py", line 508, in convert_notebooks
self.convert_single_notebook(notebook_filename)
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\nbconvert\nbconvertapp.py", line 479, in convert_single_notebook
output, resources = self.export_single_notebook(notebook_filename, resources, input_buffer=input_buffer)
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\nbconvert\nbconvertapp.py", line 408, in export_single_notebook
output, resources = self.exporter.from_filename(notebook_filename, resources=resources)
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\nbconvert\exporters\exporter.py", line 179, in from_filename
return self.from_file(f, resources=resources, **kw)
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\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:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\nbformat\__init__.py", line 141, in read
return reads(fp.read(), as_version, **kwargs)
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\nbformat\__init__.py", line 76, in reads
nb = convert(nb, as_version)
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\nbformat\converter.py", line 46, in convert
converted = convert_function(nb)
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\nbformat\v2\convert.py", line 41, in upgrade
for cell in nb.cells:
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ipython_genutils\ipstruct.py", line 134, in __getattr__
raise AttributeError(key)
AttributeError: cells

 

I need anyone of your assistance is resolving the issue. your help would be appreciated.

 

Thanks in advance...!

3 RÉPONSES 3
acarter881
Quasar

Hello, @Sagarloknath. Perhaps try copying the code and pasting it into a new Python tool and rerunning the workflow. What exactly does the Python tool setup look like?

 

Also, the error stems from this line of code in a Python file (c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ipython_genutils\ipstruct.pythat we have in one of the miniconda folders. It's a KeyError. Seems like you don't have the `key` of cells. Not entirely sure why/how though.

 

acarter881_0-1666196415169.png

 

Sagarloknath
Météoroïde

Hi acarter881

 

Thanks for your response.

 

Python tool uses Jupyter Notebook Configuration. Attached the screenshot for your reference.

Sagar_0-1666251360796.png

 

I tried the code using new python tool however it's returning the same error. Hence I did reinstalling the Alteryx Designer and the tool is working fine and I can able to execute the workflow without any errors. 

 

 

vcarey
Météore

I see this issue sometimes too.  I have to copy the code to the Python tool which is very time consuming.  It seems to pop up here and there

Étiquettes