Topaz Photo AI CLI doesn't allow paths containing spaces

Steps to reproduce issue:

On the terminal, I used the following command:

"/Applications/Topaz Photo AI.app/Contents/Resources/bin/tpai"
	--cli
	"/Users/XXXX/Desktop/test input"
	--output "/Users/XXXX/Desktop/test output"
	--overwrite
	--format jpg
	--quality 95
	--lighting
	--color

"/Users/XXXX/Desktop/test input" is the input folder containing input photos, this folder contains the input images, as you can see, this folder's path has a space in its path.
"/Users/XXXX/Desktop/test output" is the output folder, it also contains a space in its path.

When I launch the commad above, it showed the following error

[CLI] Invalid file or directory path:/Users/XXXX/Desktop/test
Error | Attempted to set index out of range: 0 images loaded, but setting index to 0 
No valid image files passed

But everything works fine if I remove the spaces in the input folder and output folder paths. In other words, tpai doesn’t know how to deal with paths containing spaces.


Topaz Photo AI [v2.3.0] on [Mac OS X Sonoma 14.2.1]

What happens is you try test%20output ?

I tried to replace the space with %, I confirm that everything works fine if I do this. So tpai is just not accepting spaces in paths as far as I can see.

Yes, using %20 as the code equivalent to a space is an old trick going back to the DOS days.

2 Likes

Good to know!

This topic was automatically closed after 60 days. New replies are no longer allowed.