Old thread but your comment saved me from endless frustration. After emailing ST support that I could not edit devices (change DTH then save) and being told how to select the correct location… duh! I was desperate to fix it on my own. Your comment pointed me to a DTH I had just modified and apparently broke even though it did not complain when I saved it. Once I swapped out the source code with a known good DTH, all was back to normal.
So… thank you for sharing how you fixed the issue !
I was getting this error when I was creating a new device very similar to an existing one. This is probably obvious to everyone except me - but don’t use the same Device Network ID for two devices. When I made the new ID unique it saved fine.