OptionValidationError in logs

  • 2022-01-13 10:00:00 -08 - [Warning-Duplicati.Library.Main.Controller-OptionValidationError]: The value "“D:” supplied to --run-script-before does not represent a valid path

I am getting the above errors in all my logs after I added a run before script. The parameter for the option is “D:\Documents\backupscripts\script.cmd” including the quotes.

The script DOES run correctly.

[Windows 11, 64bit]

Do you mean Duplicati runs correctly anyway, or it runs correctly outside of Duplicati (when you run it manually)?

Sorry iguess that wasn’t clear. It run correctly both ways. As run-script-before and stand-alone.

Ok thanks for clarifying! Please try removing the quotes around the script name (in the Duplicati config) and try again.

That fixed it. I put quotes because the instructions say “” is valid so I assumed they were needed. Thanks

Good to hear!

Can you share a link to the instructions where you saw that? Maybe I can get it fixed. Quotes may be required if there’s a space, or maybe the quotes were a problem because they were the curly kind “ ” instead of basic " ones.

I think this is mostly a command line pain where everything is on one line and needs hint on spaces.

GUI entry is already broken up enough that Duplicati doesn’t need that help. But there’s a style point:

In this case, the displayed quotes point you to the value inside the quotes, not the quotes themselves.
The value inside quotes means either use graphical elements to enter, or use three dot “Edit as text”:
(and note that the quotes there mean the value inside the quotes, not to expect it shown on the page)

image

--compression-extension-file=C:\Program Files\Duplicati 2\default_compressed_extensions.txt
--run-script-before=
--blocksize=100kb
--allow-missing-source=false

Entering that first option in Command Prompt would need the value in double quotes to avoid space break.

Was this the misunderstanding? I suppose we could omit quotes, but it might be considered bad style.
Seeing nothing might also make people wonder. What’s the best way to mean literally an empty string?

1 Like

Thank you, yes that is where I saw the quotes. I’m going to do some testing later (spaces in folder names etc.) and will report back on the results.

2 Likes