Off[FinancialData::notent] fails on first run but works thereafter. So what good is it in this case? Is there a trick to force first time success? I've tried "tricks" to my wit's end!

  • $\begingroup$ Closers: please leave this question open. The question may not be clear to everybody, but combined with the answer I find this a useful contribution to the site. $\endgroup$ – Sjoerd C. de Vries Nov 2 '14 at 12:45

Clearing Attributes and looking at the definition of the FinancialData reveals that it is just a stub that loads the corresponding paclet on the first evaluation:

ClearAttributes[FinancialData, {Protected, ReadProtected}]
FinancialData := 
   Hold[$FinancialDataSource, FinancialData], 
   "DataPaclets`FinancialData`"] /; System`Dump`TestLoad

As you see from the definition, FinancialData initially has no Messages defined, so you cannot switch them off.

For getting Off[FinancialData::notent] working you should preload the FinancialData paclet (may be there is an easier way to do this, I do not know):

FinancialData[]; Off[FinancialData::notent]

Now it works as expected:

$Off["`1` is not a known entity, class, or tag for `2`. Use `2`[] for a list of entities."]
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.