2

I am receiving an error message in Mathematica 13.2 that the system function Predict appears in more than one context: one of the definitions is shadowed.

This shouldn't be happening, of course.

In line with this post I created a function fq as follows:

SetAttributes[fq, {Listable, HoldAll}];
fq[sym_] := Block[{Internal`$ContextMarks = True},ToString[Unevaluated[sym]]]

Using this function, I see only one context for Predict:

fq[Print]
{System`Predict}

When I try to use the fully qualified symbol, i.e. System`Predict, the function fails and I get an error message:

Symbol predict appears in multiple contexts {System, Global}; definitions in context System` may shadow or be shadowed by other definitions.

I then Clear[Global`Predict], and try re-running the code, but the predict function doesn't evaluate.

I don't find any similar issues using Predict in MMA 13.1

How do I solve this issue?

MMAUser
  • 399
  • 1
  • 6
  • I can't reproduce the issue on my Windows 11 computer with MMA 13.2. Did you try to restart the kernel/Mathematica? If yes, do you maybe have some init files somewhere that automatically run code? Also, your fq function will never give more than one context for a symbol, so it will not help you diagnose issues of this kind – Lukas Lang Feb 04 '23 at 14:24

0 Answers0