We are having issues saving our Python workflows to our server. I have a simple test workflow that I've been using - input tool grabs xlsx file from a network location, python pulls it in as a dataframe, adds a new column, and exports it to new file in same network location. This runs locally with no issues. When I try to save to the server, the error says there are 0 records in the input file. I've double-checked, there are 10 rows of data in that file.
This is the specific error: RuntimeError: DataWrap2WrigleyDb::GoRecord: Attempt to seek past the end of the file
Also, I have read this knowledge base article but it's not helpful as there is data in my file (https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Python-Tool-Error-DataWrap2WrigleyD...)
screenshot:
code:
from ayx import Package
from ayx import Alteryx
df = Alteryx.read("#1")
df['new_column'] = df['Age'] - df['YearsAtCurrentJob']
Alteryx.write(df, 1)
Hi,
Without seeing the workflow and how the input file is being references, it's difficult to examine, but I have two suggestions:
1) Connect a text input to the python block and see if it is happy reading that in and processing it. This will show you if python is misbehaving.
2) Bypass the python block and connect the input directly to the output. This will show you if there is something unexpected happening with the input tool.
Ross
I ended up reaching out to support and received a solution. I didn't realize it would fail on validation if pulling from a non-text input data source. In case anyone else ever needs this, here's the explanation:
When saving a workflow to Gallery with validation enabled, Alteryx Server will run the workflow with 0 records to validate the tool config and metadata. Since no records are passed, this causes the "Alteryx.read()" statement in the Python tool to error. We have an existing defect (GCSE-358) logged regarding the "Attempt to seek past the end of the file" error when an empty dataset is passed into the Python tool. You may want to refer to the following article for further details:
You can safely ignore the "Attempt to seek past the end of the file" validation error on the Python tool. Even though there is an error, the workflow should have been added to the Gallery. You can go ahead and test running your workflow in Gallery.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 |