Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
ALTER.NEXT:

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

SAVE YOUR SPOT
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
SOLVED

Python error in chained Analytic Apps

Highlighted
Alteryx Certified Partner

Hello,

 

I have 8 analytic apps, chained to run one after the other. 
All 8 apps use a Python tool. When I run them as analytic apps, I sometimes get the below error. The error does not appear when I do a regular run and also, it appears sometimes when run as an app but sometimes it just runs through with no error. When it occasionally runs as an app, there were no changes that went in. 

Any thoughts as to what is causing this?

 

 

Python (22): --- Logging error ---
Traceback (most recent call last):
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\nbformat\validator.py", line 258, in validate
return validator.validate(nbjson)
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\jsonschema\validators.py", line 348, in validate
raise error
jsonschema.exceptions.ValidationError: {'cell_type': 'code', 'execution_count': None, 'metadata': {}, 'outputs': [], 'source': None} is not valid under any of the given schemas

Failed validating 'oneOf' in schema['properties']['cells']['items']:
{'oneOf': [{'$ref': '#/definitions/raw_cell'},
{'$ref': '#/definitions/markdown_cell'},
{'$ref': '#/definitions/code_cell'}],
'type': 'object'}

On instance['cells'][9]['source']:
{'cell_type': 'code',
'execution_count': None,
'metadata': {},
'outputs': [],
'source': None}

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\site-packages\nbconvert\exporters\exporter.py", line 318, in _preprocess
nbformat.validate(nbc, relax_add_props=True)
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\nbformat\validator.py", line 260, in validate
raise better_validation_error(e, version, version_minor)
nbformat.validator.NotebookValidationError: None is not valid under any of the given schemas

Failed validating 'oneOf' in code_cell['properties']['source']:

On instance['cells'][9]['source']:
None

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\logging\__init__.py", line 994, in emit
msg = self.format(record)
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\logging\__init__.py", line 840, in format
return fmt.format(record)
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\traitlets\config\application.py", line 117, in format
return super(LevelFormatter, self).format(record)
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\logging\__init__.py", line 577, in format
record.message = record.getMessage()
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\logging\__init__.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
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>
sys.exit(main())
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\jupyter_core\application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\traitlets\config\application.py", line 658, in launch_instance
app.start()
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\nbconvert\nbconvertapp.py", line 338, in start
self.convert_notebooks()
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_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\jupytertool_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\jupytertool_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\jupytertool_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\jupytertool_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\jupytertool_venv\lib\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:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\nbconvert\exporters\exporter.py", line 139, in from_notebook_node
nb_copy, resources = self._preprocess(nb_copy, resources)
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\nbconvert\exporters\exporter.py", line 321, in _preprocess
preprocessor)
Message: 'Notebook is invalid after preprocessor {}'
Arguments: (<nbconvert.preprocessors.tagremove.TagRemovePreprocessor object at 0x000001F712179978>,)
Traceback (most recent call last):
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\nbformat\validator.py", line 258, in validate
return validator.validate(nbjson)
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\jsonschema\validators.py", line 348, in validate
raise error
jsonschema.exceptions.ValidationError: {'cell_type': 'code', 'execution_count': None, 'metadata': {}, 'outputs': [], 'source': None} is not valid under any of the given schemas

Failed validating 'oneOf' in schema['properties']['cells']['items']:
{'oneOf': [{'$ref': '#/definitions/raw_cell'},
{'$ref': '#/definitions/markdown_cell'},
{'$ref': '#/definitions/code_cell'}],
'type': 'object'}

On instance['cells'][9]['source']:
{'cell_type': 'code',
'execution_count': None,
'metadata': {},
'outputs': [],
'source': None}

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:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\jupyter_core\application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\traitlets\config\application.py", line 658, in launch_instance
app.start()
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\nbconvert\nbconvertapp.py", line 338, in start
self.convert_notebooks()
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_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\jupytertool_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\jupytertool_venv\lib\site-packages\nbconvert\nbconvertapp.py", line 408, in export_single_notebook

 

Highlighted
Alteryx
Alteryx

Within the Python tool you will notice two modes,

Interactive and Production, is your workflow set to Production?

 

MarieB_0-1595943061193.png

 

Highlighted
Alteryx Certified Partner

It works when set to production mode.

 

Thanks Marie 🙂

 

Labels