This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
The Python Tool is throwing a RuntimeError if a input table to the Alteryx.read() function contains no rows.
The error shown is:
Error: unable to read input table "4460abb7be83bae8f01b9bf1238a923c" (C:\Users\...
I've created a workaround by inputting the column names separately, catching the error, and exporting an empty Pandas DataFrame, but the Alteryx.read() function should handle tables with no rows by creating an empty Pandas DataFrame directly.
The implementation is part of a Macro and I can't guarantee they will always be rows received.
Is there a fix on the roadmap for this? It seems like the desired behavior would be for the Alteryx.Read to return a dataframe with columns but no rows rather than throwing an error that cannot be managed?
it is possible to put the Alteryx.read('#1') into a try-except block - but if it throws an error you just don't know if the error was caused by a missing connection; a failure of the Alteryx library or an empty record-set (which should notbe a terminal error condition)! Doesn't make sense for every user to have to work around this by putting a count tool in front of every python tool just to make sure it doesn't fail because of an empty recordset coming into the input.