Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

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

74 REPLIES 74
TheOC
15 - Aurora
15 - Aurora

I've noticed mine being lost a few times too - be sure to hit the save icon within the Python too!

Hard to remember to do (for me atleast), but it seems to have stopped me losing the code.

Cheers,
TheOC


Bulien
patrick_digan
17 - Castor
17 - Castor

3 years later and my python code still has a mind of its own. AMP is off and I don't have any print statements. Most of the time, it simply reverts back a few steps, but even that can cause major headaches.

jvigneault
6 - Meteoroid

Myself and a coworker just started working with Python tool in Alteryx, only for us both to have the same issue with the Code reverting to default (e.g. code cleared out) on the same day. Now, we're realizing that anytime we leave the Python Tool, restart Alteryx, or even occasionally when we simply run the Code, the Python is likely to be completely reset, losing all completed work. 

 

It seems this has been an issue for nearly 4 years now. Very disappointing to see this as a continued issue. I would rather the Alteryx Dev Team simply revert to simple Python code and got this working so that Python can be used, than use of Jupyter Notebooks (which even if it does make debugging easier now, seems quite useless if your code is just randomly deleted).

 

Is there any work being done on this issue at the moment? Please let me know if there's any information I can provide to try to get this resolved.

dmincarelli
5 - Atom

 

Hi everyone, 

Jumping onto this thread... 

I am running Version: 2021.4.1.04899.  I used the Python tool with no problem, one day, saved the workflow, and today I'm getting the 404 error.  All my code is gone.  
Per the above suggestion, my "disable autoconfigure" has always been unchecked. 

Per the above thread and link for "how to reset the python tool"... I see that  "From version 2020.3 onwards, you will need to reinstall Alteryx Designer. "
Does this solve the problem once and for all, or is this something that will re-occur?  

Should we be using this tool? 

Please advise, 

Thanks!

Delores

gambiera
6 - Meteoroid

My code deleted today. This is Version: 2022.1.1.25127.

 

I was religiously saving after each change to the code. I figured I was done with code changes, so switched the workbook to Production mode.  Then, when changing it back to Interactive mode, my code was completely gone (fortunately, I knew all about the risk of lost code, so I had a backup).

patrick_digan
17 - Castor
17 - Castor

Yeah I still have problems with my Python code disappearing. As far as I can tell, it just seems to be a bad handoff between alteryx and jupyter. I can't seem to replicate it easily with certain steps, it just happens randomly. 

 

The only silver lining is that I did stumble on where jupyter is storing all of its data, and I've been able to recover my code when I did lose it. When I looked in my temp folder (%LocalAppData%\Temp\), I was able to sort by date modified and find my alteryx temp folder for the particular workflow i had open (Engine_11824_aa12bdeef07d482db8c565b8f9b86a35_ for example). I looked through each subfolder and opened the many .ipynb files in notepad. I was glad to see that in each case I've lost my code, I was able to find my good code in one of the .ipynb files. Once you've found your code, you can actually import it back into alteryx:

 

patrick_digan_0-1654195055815.png

 

  

In looking at the large number of ipynb files and the date modified, I came to the conclusion that somewhere an id is lost between alteryx and jupyter and it just starts a new file. 

sf_sky_scientist
5 - Atom

The exact same thing happened to me on Version: 2021.4.2.35356. Everything was working perfectly yesterday. Today, I closed Alteryx, updated my windows, and now everything is gone. I got a 404 error first, then my code was replaced with an empty template.  

Any solution? Is the Alteryx team planning to solve this?

Matthew
11 - Bolide

this happened to me a few times.

i find the best solution is to never leave your python tool in edit mode. make sure you save, and always leave the tool in production mode

dmincarelli
5 - Atom

Thank you!  I got gun-shy from using the Py tool after this painful experience and switched to the R tool.  Maybe it has been just luck but I have not had the same problem with R. 

Ringo
6 - Meteoroid

I call BS. This issue is still persistent in newer version as well and just getting worse. 

 

Another bug that makes Alteryx worse to use. I went from a believer to a hater. Alteryx badly needs to gets it act together and start fixing things. Start thinking about its customers and not just about making money.

Labels