08-06-2019 10:16 AM - edited 07-23-2021 01:46 PM
Python Tool Doesn't Show Any Results or Errors on Run
When running the Python tool in Alteryx, the output is blank, and no results or errors are shown.
Environment
Diagnosis
To ensure the issue is with the Python tool in Alteryx, create a simple 2-tool workflow with test data and code as below. Click Run in the Python tool and verify the tool returns no output and no errors.
Step 1 - Run the workflow with a Text Input Tool and Python code as below
Step 2 - Verify that the Alteryx engine reports no errors
Step 3 - Verify that the Browse tool shows no data available
Cause
The IPython kernel being called by the Jupyter Notebook may be referencing a previously installed or non-existent Python binary, rather than the Python binary installed with Alteryx.
Solution
Additional Resources
Very helpful. Thanks @DaveF !
Hi,
For the browse tool to display something on channel # 1 you have to put the following code.
if it's a dataframe
Alteryx.write (data, 1)
This will have output 1
[]
Hey @geraldo - thanks for catching that! I fixed the screenshot. This article is actually showing an uncommon environmental setup when the data won't show up in #1 because Jupyter is looking for python in the wrong place, and how to fix it.
Hi DaveF,
I am first time using the python tool in my aleryx and i used a simple code in python tool
f = open("D:\\Python\\demofile2.txt", "x")
f.write("Now the file has more content!")
f.close()
but it is not generated any file. Also it dont show me any error message.
I followed your all steps mentioned above and i tried a simple code as well but no luck 😞
from ayx import Alteryx
data = Alteryx.read(#1)
print(data)
Alteryx.write(data,1)
I searched a lot on this topic but i didnt get any solution.
Could you please help me to fix this issue. I am using the Alteryx desinger 2019.1.6
Thank you!
Hello @alt_tush
Would you be able to confirm that you have quotes around the #1 and would you also be able to include the error message you are getting during either one of the blocks of code you are running?
I'm getting the same error after installing
2022.1.1.40869
I did some checks on the installation of Jupyter notebook, as per guide here
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-notebook.exe\__main__.py", line 4, in <module>
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\notebook\notebookapp.py", line 66, in <module>
from tornado import httpserver
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\tornado\httpserver.py", line 29, in <module>
import ssl
File "c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\ssl.py", line 98, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError: DLL load failed while importing _ssl: The specified module could not be found.
Anyone else getting this?