Using UE 4.20.3 and getting "Unable to open log file for writing ..." error

Hi everyone,

I’m using Unreal Editor 4.20.3 and so far everything has run smoothly. All the changes have worked, and the Unreal editor starts properly when I double-click on the .uproject file in explorer, or by opening the editor and opening the cloned project using the browse button.

However, when I right-click on the “BuildingEscape.uproject” file in explorer and select “Generate Visual Studio project files”, it gives me the following error dialog message:

Running C:/Program Files/Epic Games/UE_4.20/Engine/Binaries/DotNET/UnrealBuildTool.exe  -projectfiles -project="C:/Users/Brett Potts/Documents/Unreal Projects/Udemy_Courses/UEDC/Section_03/BuildingEscapeClone/03_BuildingEscape/BuildingEscape/BuildingEscape.uproject" -game -rocket -progress -log=C:\Users\Brett Potts\Documents\Unreal Projects\Udemy_Courses\UEDC\Section_03\BuildingEscapeClone\03_BuildingEscape\BuildingEscape/Saved/Logs/UnrealVersionSelector-2018.10.27-11.25.21.log
ERROR: UnrealBuildTool Exception: Unable to open log file for writing (C:\Users\Brett)

I’ve looked through the message and I think that the generator doesn’t like the space in my home directory name, i.e. “Brett Potts”. The machine was built for me and the home directory was added when Windows 10 was originally installed. I know I can remove the space from the “Unreal Projects” directory without causing a major catastrophe, but I’m not sure about the home directory. I’ve noticed that it didn’t complain about the path for the “-projectfiles” switch, but only for the “-log” switch.

Should I try to change the home directory name (and can I do so without a major rebuild of the o.s.), or is there a way to put quotes around the log file path to stop the system complaining about it?

Thanks.

P.S. Thanks for the great course. I’m learning a lot about Unreal Engine … and re-learning things about C++ that I 'd actually forgotten after a long hiatus.

Looks like a bug introduced somewhere at or after 4.19. Two discussions on answers.unrealengine.com suggest that it’s a whitespace handling bug in the Unreal editor: the command works from a terminal.

For now, it seems like your options are to downgrade to something in the 4.18 series, or run the command manually from a terminal:

https://answers.unrealengine.com/questions/835644/cant-generate-project-files-unauthorized-access-to.html
https://answers.unrealengine.com/questions/834309/why-cant-i-generate-visual-studio-project-files.html

Privacy & Terms