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

Alteryx Designer Desktop Discussions

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

How to read file from Temp folder in Python

csh8428
11 - Bolide

 

I have a workflow that outputs a file to a temp folder like this %temp%\filename.yxdb.  Then I read that input using a standard input tool. That write-read sequence is controlled by control containers. That sequence runs correctly.

 

I tried replacing the read step that occurs after the write step with a python tool to read the file but I'm getting this error:

I have anonymized the TEMP FOLDER PATH\FILENAME. In the error message "TEMP FOLDER PATH\FILENAME" is the correct folder path.

Error: unable to read data (TEMP FOLDER PATH\FILENAME.yxdb)
ERROR: reading input data "#1"

 

 Why would a standard input tool be able to read the temp file, but not python?

 

-Craig

1 REPLY 1
apathetichell
19 - Altair

use formula tool to turn this into a fullpath - use:

[Engine.TempFilePath]+"yourfilename" 

 

send that into Python.

Labels