KNOWLEDGE BASE

Running Flow via Prep CLI using a batch file fails with Error "Flow file does not exist"


Published: 30 Mar 2023
Last Modified Date: 31 Mar 2023

Issue

The flow fails with the error: "Flow file does not exist" when using a batch file that contains double byte characters in flow filename.
User-added image

However, when running the same flow via Prep CLI directly in command prompt without using a bat file, it works.
User-added image

Environment

  • Tableau Prep Builder
  • Windows 10

Resolution

Option 1
If the path or the flow file name contains any double-byte characters e.g.Japanese characters, change it to the one that does not contain any double byte characters.
For example, just to make sure the full path of your flow like "\\server\path\\test_flow.tfl" as below.
"C:\Program Files\Tableau\Tableau Prep Builder 2022.3\scripts\tableau-prep-cli.bat" -t "\\server\path\​​​​​​test_flow.tfl"
Option 2
Change the code page setting of the Windows command prompt to match the encoding of your batch file.
For example, if the encoding of your bat file is UTF-8, change the code page setting of the command prompt to 65001 with the below command.
chcp 65001
Option 3
Change the encoding of your batch file to match the code page setting of the command prompt.
For example,  if the code page setting of the command prompt is 932 (Japanese), change the encoding of your batch file to Shift-JIS by using any text editor which can change the file encoding.

 

Cause

The error occurs due to the mismatch of the code page and the encoding of the external batch file used to run the flow via command line. 
 
Did this article resolve the issue?