I had this exact same problem, and it took a while to figure out, but the solution was a slap you face kind of thing:
I have a .bat file searching for the .uproject file:
for %%p in ("%ProjectFolder%\*.uproject") do (
set ProjectPath=%%p
)
which works. But before I had this code:
for %%p in ("%ProjectFolder%\*.uproject") do ( set ProjectPath=%%p )
Which has the annoyance that windows .bat syntax would set ProjectPath to something like Project.uproject … with an extra space at the end, because the set command ends at the parenthesis, not the space.
What’s interesting is that with an unreal command line call like this:
%UnrealCmd% "%ProjectPath%" -ExecutePythonScript=%PipelineScript%
Unreal does not complain that the .uproject file is not actually a file (because the name has a space at the end), and instead the UnrealEditor-cmd.exe will just happily run in the current folder as if it was the project folder and will therefore not load any plugins and therefore it would seem that python and plugins are broken, when in fact it’s that .bat syntax is dumb, and the unreal command doesn’t complain (very well) about the non-existing file.
So, beware that the unreal command may not be complaining in a logical way when you run it.