Alteryx Designer Desktop Discussions

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

Python tool loses code after copy and paste

mauricio
8 - Asteroid

Hi,

I'm experiencing what senms to be a bug.

When I copy and paste a python tool, the code disappear uppon exiting the python tool, or when I switch between production and notebook mode.

I tried to use the save button on the notebook with no sucess.

Anyone has experienced the same issue?

 

I'm running version 2020.3.5

6 REPLIES 6
PedrodeOl
9 - Comet

@mauricio

 

Check the post below, it may answer your question:

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/DE28799-Duplicated-workflow-with-Py...

 

One aproach you could try:

 

Enable xml view and try to edit your python code there.

PedrodeOl
9 - Comet

@mauricio 

is it a new workflow or are you copying a previous one?

JeffA
Alteryx Alumni (Retired)

@mauricioIf you continue having trouble with this issue, it may be worth checking out the Jupyter Flow tool. It has all the capabilities of the Python tool but does not manage your notebook and therefore will not delete it. It also has the advantage of being shareable and easy to run on Alteryx Server.

Jeff Arnold
Sr. Full Stack Software Engineer | Alteryx
mauricio
8 - Asteroid

@JeffA  I will check, it sems to be a good alternative to the standard python tool

@PedrodeOlTudo bom pedro? Atualmente estou copiando o código em texto, e colando em uma caixinha do python nova, porque quando copio direto caixinha do python ele não mantem o código. O a pegadinha é que de inicio aparece o código certinho, mas quando sai do workflow o código some, justo nessas caixas que eu copiadas

PedrodeOl
9 - Comet

@mauricio,

 

Se você está copiando um workflow que já tinha uma tool de python anteriormente, mesmo arrastando uma nova ferramenta, ele acaba deletando, os passos que sigo que evitam esse delete, além de salvar o cod em uma comment tool, são:

 

- Rodar o flow para passar dados upstream para a tool de python.

- Executar o cod dentro da tool de python e salvar na propria tool.

- Executar o flow novamemente (aparentemente isso garante a criacao do .py na pasta temp do Atx)

- Trocar a tool de python para production mode

 

Alguns desses passos são comuns aos que vc já vem fazendo?

mauricio
8 - Asteroid

@PedrodeOl  é bem isso que estou passando.

Seguindo essa ordem da certo, e a dica de salvar o código em um comentário é boa também, vou seguir aqui para garantir.

Labels