I had the same issue and found out that the cause was this file:
My Documents\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml
Deleting it was the solution.
There are two other potential locations of the buildConfiguration.xml
I’d advise checking all of them to see if any of them are empty.