Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Problems with Python Tool

I'm having two problems with the Python tool:


  1.[0]) works intermittently, with no changes in the Python script or Alteryx workflow. Running multiple times normally gives the error AttributeError: 'list' object has no attribute 'is_unique' but occasionally allows me to view the data fine. I have only one input into the tool, which is feeding a single column of V_Strings (I have tried Strings and V_WStrings with the same outcome)
  2. When the data is correctly loaded, while working in the Jupyter notebook, the first issue reoccurs with no warning, seemingly having dropped the cache.


When running the workflow, the tool flags:


Error: Python (173): [NbConvertApp] Converting notebook C:\Users\SEBAST~1.ARR\AppData\Local\Temp\5c83da68-0f3b-4589-9152-1975cd469061\173\workbook.ipynb to html
[NbConvertApp] Executing notebook with kernel: python3
[NbConvertApp] ERROR | Error while converting 'C:\Users\SEBAST~1.ARR\AppData\Local\Temp\5c83da68-0f3b-4589-9152-1975cd469061\173\workbook.ipynb'
Traceback (most recent call last):
  File "c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\nbconvert\", line 393, in export_single_notebook
    output, resources = self.exporter.from_filename(notebook_filename, resources=resources)
  File "c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\nbconvert\exporters\", line 174, in from_filename
    return self.from_file(f, resources=resources, **kw)
  File "c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\nbconvert\exporters\", line 192, in from_file
    return self.from_notebook_node(, as_version=4), resources=resources, **kw)
  File "c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\nbconvert\exporters\", line 85, in from_notebook_node
    return super(HTMLExporter, self).from_notebook_node(nb, resources, **kw)
  File "c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\nbconvert\exporters\", line 280, in from_notebook_node
    nb_copy, resources = super(TemplateExporter, self).from_notebook_node(nb, resources, **kw)
  File "c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\nbconvert\exporters\", line 134, in from_notebook_node
    nb_copy, resources = self._preprocess(nb_copy, resources)
  File "c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\nbconvert\exporters\", line 311, in _preprocess
    nbc, resc = preprocessor(nbc, resc)
  File "c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\nbconvert\preprocessors\", line 47, in __call__
    return self.preprocess(nb, resources)
  File "c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\nbconvert\preprocessors\", line 262, in preprocess
    nb, resources = super(ExecutePreprocessor, self).preprocess(nb, resources)
  File "c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\nbconvert\preprocessors\", line 69, in preprocess
    nb.cells[index], resources = self.preprocess_cell(cell, resources, index)
  File "c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\nbconvert\preprocessors\", line 286, in preprocess_cell
    raise CellExecutionError.from_cell_and_msg(cell, out)
nbconvert.preprocessors.execute.CellExecutionError: An error occurred while executing the following cell:

AttributeError                            Traceback (most recent call last)
<ipython-input-4-0bf8d58a2a02> in <module>()
----> 1[0])

c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\ayx\ in read(incoming_connection_name)
     15     When running the workflow in Alteryx, this function will convert incoming data streams to pandas dataframes when executing the code written in the Python tool. When called from the Jupyter notebook interactively, it will read in a copy of the incoming data that was cached on the previous run of the Alteryx workflow.
     16     '''
---> 17     return __CachedData__().read(incoming_connection_name)
     19 def write(pandas_df, outgoing_connection_number):

c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\ayx\ in read(self, incoming_connection_name)
    287                 try:
    288                     # get the data from the sql db (if only one table exists, no need to specify the table name)
--> 289                     data = db.getData()
    290                     # print success message
    291                     print(''.join(['SUCCESS: ', msg_action]))

c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\ayx\ in getData(self, table)
    134         # if no table specified, check to see if there is only table and use that
    135         if table is None:
--> 136             table = self.getSingularTable()
    138         # now that the table name has been retrieved, get the data as pandas df

c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\ayx\ in getSingularTable(self)
    111     # if one table exists, return its name, otherwise throw error
    112     def getSingularTable(self):
--> 113         tables = self.getTableNames()
    114         table_count = len(tables)
    115         # if no tables exist throw error

c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\ayx\ in getTableNames(self)
     97         return pd.read_sql_query(
     98             "select name from sqlite_master where type='table'",
---> 99             self.connection
    100             )['name'].tolist()

c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\pandas\io\ in read_sql_query(sql, con, index_col, coerce_float, params, parse_dates, chunksize)
    312     return pandas_sql.read_query(
    313         sql, index_col=index_col, params=params, coerce_float=coerce_float,
--> 314         parse_dates=parse_dates, chunksize=chunksize)

c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\pandas\io\ in read_query(self, sql, index_col, coerce_float, params, parse_dates, chunksize)
   1425             frame = _wrap_result(data, columns, index_col=index_col,
   1426                                  coerce_float=coerce_float,
-> 1427                                  parse_dates=parse_dates)
   1428             return frame

c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\pandas\io\ in _wrap_result(data, columns, index_col, coerce_float, parse_dates)
    139                                    coerce_float=coerce_float)
--> 141     _parse_date_columns(frame, parse_dates)
    143     if index_col is not None:

c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\pandas\io\ in _parse_date_columns(data_frame, parse_dates)
    125     # we could in theory do a 'nice' conversion from a FixedOffset tz
    126     # GH11216
--> 127     for col_name, df_col in data_frame.iteritems():
    128         if is_datetime64tz_dtype(df_col):
    129             data_frame[col_name] = _handle_date_column(df_col)

c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\pandas\core\ in iteritems(self)
    722         """
--> 723         if self.columns.is_unique and hasattr(self, '_item_cache'):
    724             for k in self.columns:
    725                 yield k, self._get_item_cache(k)

AttributeError: 'list' object has no attribute 'is_unique'
AttributeError: 'list' object has no attribute 'is_unique'


Hi @SebastianFSA,


So I have run a couple of tests with Alteryx Designer 2018.3 non admin -which seems to be your version too- but I have not been able to reproduce your issue. Could you please share your workflow with me if possible ?


Kind regards,


Paul Noirel

Sr Customer Support Engineer, Alteryx


I have the same issue. It appears this is an internal setting with the package whereby it has a very small timeout threshold of 30 seconds. How can we adjust this threshold?


Error: Python (17): [NbConvertApp] Converting notebook C:\ProgramData\Alteryx\Engine\a1ed0ce5-5267-4e7b-9782-544d5ba1cf2b\17\workbook.ipynb to html
[NbConvertApp] Executing notebook with kernel: python3
[NbConvertApp] ERROR | Timeout waiting for execute reply (30s).
Traceback (most recent call last):
File "c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\nbconvert\preprocessors\", line 324, in _wait_for_reply
msg = self.kc.shell_channel.get_msg(timeout=timeout)
File "c:\program files\alteryx\bin\miniconda3\pythontool_venv\lib\site-packages\jupyter_client\blocking\", line 57, in get_msg
raise Empty


Hi @ecastruita,


You are correct: by default Jupyter -what is used as an interface for Python tool- uses a timeout of 30 seconds per cell execution.


You have a couple of options to change this behaviour:


Could you please me know if this works for you ?


Kind regards,


Paul Noirel

Sr Customer Support Engineer, Alteryx


Thank you, the solution to change line 68 in the "" file to -1 from 30 worked. I reinstalled the server after having done this and the change persisted.