12-21-2020 08:18 AM - edited 07-22-2021 05:00 PM
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)"
Error: unable to read data (C:\AppData\Alteryx\Engine\Engine_23200_be6a9480b4fc4e038a8668b82debdf74_\aa37b5ac-6323-472b-8f0f-5cb0b95b822e\4460abb7be83bae8f01b9bf1238a923c.yxdb).
There is no data available to the Alteryx.read() command within the tool.
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.
@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
@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.
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.
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..
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.