Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Python tool loses code

patrick_digan
17 - Castor
17 - Castor

Has anybody else lost their Python code? It has happened to me twice. I go to run my workflow and see that my few hundred lines of code have been deleted and replaced with the standard default:

Capture.PNG

78 REPLIES 78
michael_anthony
6 - Meteoroid

I have version 2018.4.5 and I have experienced this same issue, it appears that the 2018.4 fix was incomplete.  My python notebooks will be reset to defaults during a work session after I have saved them.

cam_w
11 - Bolide

Following - Our team has reported several of these incidents in the past few months.

pingcanada
5 - Atom

Still having this issue In August 2020, will Alteryx fix it? it's been annoying keep code backup and paste them back time after time.

ntcameron
5 - Atom

I ran into this issue today.  I had selected 'Disable Auto Configure' option in User Settings/Advanced.  When I un-clicked this just now, the code was restored.  Not sure if this is a solution broadly but it is working for my workflows.  Hope this helps.

CdReddy
5 - Atom

This error raised its head again. 
I just installed the latest version and ran workflows using the Python widget. All fine.

A while later it just started giving me 404 errors.

 

Well it seems i had turned the AMP engine on -  this appears to have created the error. 

 

After switching the AMP off, workflows ran normally. 

 

Hope this helps someone!

Joshman108
8 - Asteroid

Something that appeared to an issue for me was pasting too many lines of code into a single cell at once. I was pasting 1700 lines into a single cell and the notebook completely refused to save the configuration after clicking off of it.

But I pasted ~800 lines in at a time, clicked off, clicked back in, pasted another 800 lines and clicked out, and it saved.

 

This was after restoring user defaults as well, maybe that helped.

In any case the python tool has given me nothing but frustration in alteryx, this is one of 3-4 major issues that make me feel like a very very very unhappy customer. 

AmarReddy
5 - Atom

Even i faced the issue.

After some analysis, guess, i found a probable workaround for the issue. And probably it might help someone.


The plausible explanation why it happens is because if the code has a PRINT statement, then the contents of Python Notebook changes on execution of the tool.
Removing the Print Statements from the code should help solve the problem.
 

MarkSmithAU
5 - Atom

I hit this same issue (losing code and jupyter 404 errors) with 2021.2.1.35394 and czr1803's workaround of disabling AMP fixed it immediately.  Extremely frustrating!

xAJBx
7 - Meteor

Lost mine as well, running 2020.2.  Clicked run on the workflow...process ran successfully...clicking back on the python tool and it is a blank canvas...

TSorco
5 - Atom

Any update on a solution would be greatly appreciated.  We just starting using the Python tool and will likely use it more.  We have already had once instance where the code was "lost".  We are looking to expand our usage of this tool, but right now I am extremely hesitant.

Labels
Top Solution Authors