Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

Python tool Error: unable to read data...

lepome
Alteryx Alumni (Retired)
Created

Environment Details


A workflow that includes a Python tool may throw an error of the form "Error: unable to read data (C:\AppData\Alteryx\Engine\Engine_23200_be6a9480b4fc4e038a8668b82debdf74_\aa37b5ac-6323-472b-8f0f-5cb0b95b822e\4460abb7be83bae8f01b9bf1238a923c.yxdb)"
 

  • Alteryx Designer, Server 
    • All versions
  • Python tool
 
Error: unable to read data (C:\AppData\Alteryx\Engine\Engine_23200_be6a9480b4fc4e038a8668b82debdf74_\aa37b5ac-6323-472b-8f0f-5cb0b95b822e\4460abb7be83bae8f01b9bf1238a923c.yxdb). 


Cause


There is no data available to the Alteryx.read() command within the tool.



Resolution


Update the logic of your code so that a lack of data doesn't prevent the entire workflow from running. A suggestion would be to use a try/except clause to check for data before further processing.

Comments
Joker_Hazard
11 - Bolide

@lepome Hello Lisa.

What if I have input data from all connections and still have this bug? 

For instance, I would need to use all data from connections so, having this clause would not solve my issue.. Is any solution being developed? I have a workflow that takes 30minutes to run and eventually this bugs is very frustrating..

Thanks

lepome
Alteryx Alumni (Retired)

@Joker_Hazard 
I don't personally know Python well enough to speculate on how to proceed when there are incoming data available.  I hope that if you post your question with a suitable example as a Discussion topic, someone in the Community will be able to help you.

ettoreaquino
5 - Atom

Hello @lepome

 

As @Joker_Hazard mentioned, the problem has nothing to do with code structure in python or the absence of data.

 

I'm having the same issue. I noticed that, when using "Text Input" to provide data to the Python Tool anchor, the tool works just fine, but when a "Data Input" tool is used, Alteryx writes the data to the staging directory (from where the Python environment reads it), and that is where the problem is. Somehow the Python environment cannot access the files within the staging.

 

I've tried to configure several different locations for the staging, as well as changing the permission level on such directories, nothing works. Please note that I've verified the existence of the file within the staging directory, and it is there as a .yxdb file there, as expected.

ExampleExample

 

PythonCodePythonCode

 

Error reading inputError reading input

 

Works reading from text inputWorks reading from text input

 

adnbbh
5 - Atom

Hi @ettoreaquino

 

Did you manage to resolve this in the end? I'm having this problem atm and it is incredibly frustrating i.e. nothing works but it should work.. 

Felipe_Ribeir0
16 - Nebula

Hi all,

 

One approach that i am using here and it is working well is to union a text input with the same headers and null data/irrelevant data before of the python tool. Just be sure to insert data that is accepted by the code and that wont produce any relevant result before using it.

 

Felipe_Ribeir0_0-1683720501187.png