Message Boards Message Boards

0
|
18327 Views
|
14 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Why doesn't Quantity[] and related functions work for me?

14 Replies

I often see this problem where units stop working but I have not been able to produce a sequence of commands to reproduce it. However, I have found this commands fixes the issue:

<<QuantityUnitsLoader`

This does not prevent the issue from hapening again in the future but at least fixes it when it happens.

POSTED BY: Gustavo Delfino
Posted 9 years ago

Hi. It sounds like your version is working. What I had to do for the Mac, and it appears to work, was the following...

Get["EntityFramework`"]

However, entering that command now doesn't seem to do anything for me at the moment. Perhaps it is because it's working. Perhaps when it was broken/missing, it triggered a refresh. I don't know.

Then, when I entered the following, it rebuilt the data interface.

EntityValue[]

Support told me they are aware of the issue, at least for the Mac. I'm not sure of Windows versions.

POSTED BY: Dana DeLouis

Thanks, that's helpful. I've got the Units stuff working OK now, but I was playing around with sounds (Play, EmitSound, etc.) and had to quit and restart MMA before it would actually make noise. At one point in the process, just as with Units, it appeared that something was being loaded from the Wolfram site. On the other hand, the few Entity things that I've tried from the Help examples (e.g., Entity["Mythology"]["Properties"]) have worked OK.

How do you reset Paclet data? Via PacletUpdate, or ...?

Posted 9 years ago

Just a comment. It's a know issue with Mac Computers since about 10.2 Wolfram told me they are aware of the issue. On a Mac, commands that access "Entity" values from the web also do not work. (Especially accessing Geo' Function. The solution was to reset the Paclet data a few times, and reboot the computer before it would work. It took a while to get it reset on the Mac so it would access the web data correctly.

Just some additional versions...

UnitConvert[Quantity[12, "Meters/Second"], "Miles/Hour"]
Quantity[37500/1397, Miles/Hours]

UnitConvert[Quantity[12, "Meters/Second"], "mph"]
Quantity[37500/1397, Miles/Hours]
POSTED BY: Dana DeLouis

It is probably worth clarifying that this is presumably a sporadic issue--I have never encountered it (Mac installation) and the various folks that I work with who are using a similar installation have not encountered it. As in all cases where something is not working that clearly should work, it's best to contact Wolfram technical support to get the inside track as Dana DeLouis did.

POSTED BY: David Reiss

"Any port in a storm." I'm glad it's working now!

POSTED BY: David Reiss

In fact, I just checked by trying to load Units, and got a "Cannot open "Units`" $Failed result. So whatever I did earlier seems to have provoked a proper upgrade of the installation.

For some reason, the old behavior of the Units package no longer persists after I did what I described. Convert[ ] no longer is recognized as a function, but UnitConvert[ ] now is. So I think that the automatic(?) upload from the Wolfram site, triggered by the restart after addition to the init.m file, updated the program properly.

POSTED BY: David Reiss
POSTED BY: David Reiss
POSTED BY: David Reiss

That seems to have done the trick. Thanks.

I don't know the reason why it does not work by default. The code you posted works fine for my Mathematica. However if you'd like to work it around, editing the init.m file in C:\ProgramData\Mathematica\Kernel should do the trick. Simply add

Needs["Units`"]

at the end of the file.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract