Alteryx IO Discussions

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.

Internal Error - Deadlock detected (@1)

9 - Comet

What is the cause of this error?


Internal error: Failed to read port assignment
Internal Error - Deadlock detected (@1)




This error seemingly cropped up today with no changes to my custom tool, and nothing I've tried has gotten rid of it.

  • Designer 2023.1.1.247
  • Python v3.8.10
  • ayx_plugin_cli v1.1.0
  • ayx_python_sdk v2.2.0


This is currently affecting all of my custom tools, including one that does nothing but pass data through


class MyPlugin(PluginV2):
    def __init__(self, provider: AMPProviderV2): = "My Plugin"
        self.provider = provider

    def on_record_batch(self, batch: pa.Table, anchor: Anchor) -> None:
        self.provider.write_to_anchor("Output", batch)

    def on_incoming_connection_complete(self, anchor: Anchor) -> None:

    def on_complete(self) -> None:



I'm building the tool with


rd /s /q "ui\PlaceholderToolName" & echo y | ayx_plugin_cli designer-install --use-ui --install-type user



I've tried

  • Deleting .ayx_cli.cache, build, ui\PlaceholderToolName, and main.pyx
  • Deleting C:\Users\username\.shiv
  • Deleting %APPDATA%\Alteryx\Tools\toolname and C:\ProgramData\Alteryx\Tools\toolname
  • Installing as both user and admin
  • Creating a brand new tool with `ayx_plugin_cli create-ayx-plugin --use-ui` and copying over the code
  • Restarting Designer and my computer
  • Uninstalling all version of Python, deleting AppData\Local\Programs, reinstalling Python 3.8.10 and ayx-plugin-cli and ayx-python-sdk
7 - Meteor

I don't have much to add to this other than I'm also experiencing it on a custom built tool. Alteryx version 2023.1.1.247 patch 2


Can you try running the tool using Designer's PED? The path should be something like: "C:\Program Files\Alteryx\bin\Python\python-3.8.16-embed-amd64\python.exe"  - try opening powershell in the %APPDATA%\Tools\toolname directory, and run "C:\Program Files\Alteryx\bin\Python\python-3.8.16-embed-amd64\python.exe main.pyz start-sdk-tool-service ayx_plugins <tool name>" - that SHOULD hopefully raise a usable error

9 - Comet

The `Alteryx\bin\Python` folder doesn't contain v3.8.16, but it contains v3.8.5. Running the following command does not result in errors



PS C:\Users\username\AppData\Roaming\Alteryx\Tools\MyPlugin_1_0> C:\Program` Files\Alteryx\bin\Python\python-3.8.5-embed-amd64\python.exe main.pyz start-sdk-tool-service ayx_plugins MyPlugin
INFO: Starting MyPlugin tool with AMP Provider.
ListenPort: 53182



Strangely, the error in Designer seems to have gone away after trying this...


Interesting - maybe the backend was unzipped improperly? Though I'm not sure why that would happen

6 - Meteoroid

Hi community,

I have the same issue when I am trying to connect Alteryx Designer with Google Analytics API via  Alteryx Google Analytics 4 Input (tool). Google Analytics (tool) has stopped returning data after a point in time so I want to manage this connectivity because we cannot access the data and obviously feed our reports.

I attach a screenshot:


I have managed to authorize the user (me) and connect to the google account but when I run the workflow I get this error like the one mentioned (deadlock detected) and one more internal error: failed to read port assignment.

The Alteryx Designer version is: Version: 2022.3.1.486 Patch: 3


Can anyone please help?

Thank you.

7 - Meteor

Thanks for the advice, I have something useful:


EXCEPTION: ERROR: Couldn't find module ayx_plugins for loading plugins.
Traceback (most recent call last):
  File "C:\Users\Craig\.shiv\main_ec795b7885cae9835cc91bed802eb83f74cd3458c5e96019f4813fbcda09573d\site-packages\ayx_python_sdk\providers\amp_provider\", line 62, in load_plugin_class
    plugins_module = importlib.import_module(plugins_package)
  File "importlib\", line 127, in import_module
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'ayx_plugins'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 194, in _run_module_as_main
  File "", line 87, in _run_code
  File "main.pyz\", line 3, in <module>
  File "main.pyz\_bootstrap\", line 233, in bootstrap
  File "main.pyz\_bootstrap\", line 36, in run
  File "C:\Users\Craig\.shiv\main_ec795b7885cae9835cc91bed802eb83f74cd3458c5e96019f4813fbcda09573d\site-packages\ayx_python_sdk\providers\amp_provider\", line 81, in main
  File "C:\Users\Craig\.shiv\main_ec795b7885cae9835cc91bed802eb83f74cd3458c5e96019f4813fbcda09573d\site-packages\typer\", line 214, in __call__
    return get_command(self)(*args, **kwargs)
  File "C:\Users\Craig\.shiv\main_ec795b7885cae9835cc91bed802eb83f74cd3458c5e96019f4813fbcda09573d\site-packages\click\", line 829, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\Craig\.shiv\main_ec795b7885cae9835cc91bed802eb83f74cd3458c5e96019f4813fbcda09573d\site-packages\click\", line 782, in main
    rv = self.invoke(ctx)
  File "C:\Users\Craig\.shiv\main_ec795b7885cae9835cc91bed802eb83f74cd3458c5e96019f4813fbcda09573d\site-packages\click\", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\Craig\.shiv\main_ec795b7885cae9835cc91bed802eb83f74cd3458c5e96019f4813fbcda09573d\site-packages\click\", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\Craig\.shiv\main_ec795b7885cae9835cc91bed802eb83f74cd3458c5e96019f4813fbcda09573d\site-packages\click\", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\Craig\.shiv\main_ec795b7885cae9835cc91bed802eb83f74cd3458c5e96019f4813fbcda09573d\site-packages\typer\", line 497, in wrapper
    return callback(**use_params)  # type: ignore
  File "C:\Users\Craig\.shiv\main_ec795b7885cae9835cc91bed802eb83f74cd3458c5e96019f4813fbcda09573d\site-packages\ayx_python_sdk\providers\amp_provider\", line 48, in start_sdk_tool_service
    plugin_class = load_plugin_class(plugins_package, tool_name)
  File "C:\Users\Craig\.shiv\main_ec795b7885cae9835cc91bed802eb83f74cd3458c5e96019f4813fbcda09573d\site-packages\ayx_python_sdk\providers\amp_provider\", line 64, in load_plugin_class
    raise ModuleNotFoundError(
ModuleNotFoundError: ERROR: Couldn't find module ayx_plugins for loading plugins.


A quick google with the more general deadlock error does seem to show it's fairly widespread and always seems to reference tools build with the SDK such as Google Analytics and Sharepoint

9 - Comet

This error has cropped up much more often when attempting to migrate to ayx-plugin-cli 1.1.1 and ayx-python-sdk 2.3.0. I've reverted back to the older versions of 1.1.0 and 2.2.0 until there is a good reason to upgrade.

10 - Fireball

@mkhtran We are experiencing this same issue when using the new Google Analytics 1.0.1 connector built by Alteryx. Have you found a workaround other than reverting to older versions? 

9 - Comet

Hoping Alteryx can provide some more insight as to what this error is.