# Why is this UnitConvert not converting?

Posted 14 days ago
194 Views
|
5 Replies
|
6 Total Likes
|
 EntityValue[Entity["Country", "UnitedStates"], EntityProperty["Country", "FreshwaterWithdrawals"]]returns:
5 Replies
Sort By:
Posted 14 days ago
 I get the same result. Looks like a bug.Very interested in hearing the resolution. Thank you for bringing this up.
Posted 14 days ago
 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"] 
Posted 13 days ago
 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 InternalClearEntityValueCache["Country"]; `but it will fail on subsequent evaluations.@Luc Barthelet You should report this to WRI.