2
$\begingroup$

I'm an absolute idiot when it comes to Mathematica - I only use it for really basic things (because we use it as a graphic calculator in my high school class), so formatting will be less than ideal. Apologies in advance.

Recently when I've tried to define a function with the syntax:

f[x_]:=x^2

and then I type:

?f

The output says:

CloudObject`Private`f
f[x_]:=x^2

This is happening for every function I define. Moreover, usually the function name turns black after it is defined, but that doesn't happen anymore - it just stays blue, which might be related to the whole CloudObject issue? What even is CloudObject?? And more importantly, how do I get rid of it? I just want it to go back to what it was before.

$\endgroup$
2
$\begingroup$

It looks like a package was interrupted while loading, leaving your context in a bad state. Here is a simulation of what you're observing:

Begin["CloudObject`Private`"];
f[x_] := x^2

Then:

?f

CloudObject`Private`f

f[x_]:=x^2

Notice the bad context:

$Context

"CloudObject`Private`"

So, the remedy is to return to the Global` context:

End[];

Now, the context is good:

$Context

"Global`"

$\endgroup$
  • $\begingroup$ Thanks so much Carl - I think it worked! However, I seem to have a new problem - the '?' no longer works for built-in functions. Usually when I type in the input: ?Plot it will give me a list of the possible ways to use the Plot function. However now it says: System`Plot Attributes[Plot]={HoldAll,Protected,ReadProtected} Options[Plot]={AlignmentPoint->Center,AspectRatio->1/GoldenRatio,Axes->True,AxesLabel->None,AxesOrigin->Automatic,AxesStyle->{},Background->None,BaselinePosition->Automatic,BaseStyle->{},ClippingStyle->None,ColorFunction->Automatic etc. How do I change this? $\endgroup$ – Ashley May 17 at 14:08
  • 1
    $\begingroup$ @Ashley Your $ContextPath has also been corrupted. You could try $ContextPath = {"System`", "Global`"}, but it might be easier to just quit the kernel and restart. $\endgroup$ – Carl Woll May 17 at 14:20

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.