Alteryx Designer Desktop Discussions

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

Python tool with strange behavior - code changes by itself?

avanibhatnagar
8 - Asteroid

Has anyone experienced the Python tool changing the code randomly? We have 4 Python tools in a workflow and 2 of them keep randomly changing and somehow end up with the code from the first tool and keep losing their code. We have the code for each Python tool in a comment so we are able to get it back easily but it is not reliable since we don't know when it will randomly change. For example, we pulled the workflow down yesterday and the 2 tools had the incorrect code and we fixed it but again today when we pulled the workflow down, the workflow failed because the scripts had changed. Has this happened to anyone before??It is really strange behavior. 

5 REPLIES 5
Brankl
7 - Meteor

Hi avanibhatnagar. This sounds like it could be a version control issue. Are you using packaged workflows at all? It's possible the package is referring back to an older version of the python tool that is saved elsewhere. I've seen this happen with macro updates, depending on whether the macro is in the right folder or saved separately.

avanibhatnagar
8 - Asteroid

Thanks for responding @Brankl. Not sure what you mean by version control. Even when we drag a brand new Python tool to the workflow - it automatically populates it with the code from the 1st tool and changes existing Python tools to the code from the 1st tool. We are not using a packaged workflow. It is just a normal .yxmd file. 

apathetichell
19 - Altair

wasn't there an issue with VENV code bleed a while ago? I think a non-containerized python environment is ripe for issues. For a design change - can you partition each python tool into a seperate macro so hypothetically it's semi-seperated from the others? Also - um turn off AMP (you probably can't) and swap to production vs interactive mode in your python tool. 

Brankl
7 - Meteor

Hmmm, I was hoping it was an issue with a packaged workflow. If it's just a .yxmd, I don't have any answers (sorry).

 

I agree with apathetichell to check virtual environment and python tool settings. Alteryx predictive tools come pre-packaged with dependencies that are known to cause issues if your code calls a different version of the same package.

Ritik
5 - Atom

Hi @avanibhatnagar ,Also facing the same issue. scripts from multiple python tool getting swapped. But this only happens when i am running the workflow with amp enabled in my case. Please let me know if you have resolved this issue?

 

Labels