Why is this UnitConvert not converting?

EntityValue[Entity[“Country”, “UnitedStates”],
EntityProperty[“Country”, “FreshwaterWithdrawals”]]

returns:

ScreenShot2020-06-27at2.40.10PM.png

I get the same result. Looks like a bug.

Very interested in hearing the resolution. Thank you for bringing this up.

The second argument to UnitConvert has to be just a unit specification. This works

w = EntityValue[Entity["Country", "UnitedStates"], EntityProperty["Country", "FreshwaterWithdrawals"]];

UnitConvert[w, "Giga" "Feet"^3/"Years"]

Rohit:

That is good news. But why would an entity return an invalid unevaluated UnitConvert?

Hi Mike,

I tried the code I posted on 12.1.1 and now it fails. I tried 12.0 and 12.1 and sometimes the first evaluation works but subsequent evaluations fail. Seems like a caching bug in the entity framework. To get it to reliably work on the first evaluation

Internal`ClearEntityValueCache["Country"];

but it will fail on subsequent evaluations.

@Luc Barthelet You should report this to WRI.

I filed a bug .[CASE:4563074]

Good luck team!

Thank you
Luc