Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

TVL-364: Error: "RuntimeError: Field: <FIELD_NAME> is 0 length" when running Jupyter Flow tool

clarab
Alteryx
Alteryx
Created

Error: “Field: <FIELD_NAME> is 0 length”

 

Environment Details

 

Creating a date field in the Jupyter Notebook and passing it into Jupyter Flow tool causes the following error in the JupyterFlow log file:
 

RuntimeError: Field: <FIELD_NAME> is 0 length
 

Code example in Jupyter Notebook:
 import pandas as pd
 todate = pd.to_datetime('today').date()
 data1 = pd.DataFrame({"col1":["1"], "col2":["1"], "date":[todate]})
 
 #ayx_output=1
 data1


Error example:

image.pngimage.png

Cause

 

The new date field is not passed into the Jupyter Flow tool correctly. TVL-364 has been logged to address this.



Resolution

 

To pass a new date field to the Jupyter Flow tool requires the field to be explicitly defined as a date data type.

Code Example (the statement in bold is to explicitly define the data type):

 import pandas as pd
 todate = pd.to_datetime('today').date()
 data1 = pd.DataFrame({"col1":["1"], "col2":["1"], "date":[todate]})
 
 data1["date"] = data1["date"].astype('datetime64[ns]')
 
 #ayx_output=1
 data1