2
$\begingroup$

Scidraw has suddenly stopped working for me. I get the error

FigCompositeElement::objsyntax: Missing or unexpected arguments in FigCompositeElement[CollectGraphicalElements[FigPolygonElement[{Rectangle @@ Transpose[SciDraw`Private`Window$10373[CanvasRegion[]]]}, Flatten[{Layer -> SciDraw`Private`$FigBackgroundLayer, ShowLine -> False, ShowFill -> True, FillColor -> (Background /. FigOptions), FillOpacity -> (BackgroundOpacity /. FigOptions), FillDirectives -> (BackgroundDirectives /. FigOptions), FigOptions}]], Object[Object$19], GrayLevel[1]],Object[Object$19],0,Clip -> False,Debug -> True]. (The given arguments do not match any of the definitions for the constructor for class FigCompositeElement.) W

When running the example from the manual

Figure[ FigurePanel[ { FigGraphics@Plot[x, {x, 0, 1}]; }], CanvasSize -> {5, 3.5}]

Along with these error when I load the package:

SetDelayed::write: Tag ObjectExistsQ in ObjectExistsQ[Self:Object[A_]] is Protected. SetDelayed::write: Tag BoundingRegion in BoundingRegion[ObjectList:{(_Object?(And[<<2>>]&)|_?(And[<<2>>]&)|_Object?(And[<<2>>]&)|_?(And[<<2>>]&))..}] is Protected. SetDelayed::write: Tag BoundingRegion in BoundingRegion[obj:_Object?(ObjectExistsQ[Slot[<<1>>]]&&MemberQ[ClassAncestry[<<1>>],FigAnchor]&)|_?(ObjectExistsQ[Object[<<1>>]]&&MemberQ[ClassAncestry[<<1>>],FigAnchor]&)|_Object?(ObjectExistsQ[Slot[<<1>>]]&&MemberQ[ClassAncestry[<<1>>],FigObject]&)|_?(ObjectExistsQ[Object[<<1>>]]&&MemberQ[ClassAncestry[<<1>>],FigObject]&)] is Protected. General::stop: Further output of SetDelayed::write will be suppressed during this calculation.

This is absolutely devastating for me, since I have used Scidraw for a long time for all of my scientific drawings. I tried reinstalling both scidraw and mathematica in case one of the files got corrupted, but this did not help. I suspect some recent update of mathematica is responsible.

I am using Mathematica 12.1 and scidraw 0.0.7. It used to work with this version. I get the same error in v12.3. Is scidraw too old now?

Thank you so much to anyone who can help!

EDIT: Evidently this has been documented before and only now has the functionality broken down... SciDraw error loading package

UPDATE:

with v11.3 I get the following error message:

Figure::figbadopt: Option Style has invalid value None.

After reinstalling SciDraw, I get the same error message with v11.3 with 12.1 and 12.3

$\endgroup$
7
  • $\begingroup$ I do not use sciDraw. But if it works with 12.1 as you say, why not use 12.1 to make the drawings only, and use 12.3 for everything else? Have you tried to contact the author of sciDraw to see what the status of this package with 12.3? $\endgroup$
    – Nasser
    Commented Jun 16, 2021 at 4:46
  • $\begingroup$ No, it has suddenly stopped working with 12.1 giving the error I showed. It used to work and then all of a sudden this happened. $\endgroup$
    – Takoda
    Commented Jun 16, 2021 at 7:35
  • $\begingroup$ Can you clarify what you mean by "it suddenly stopped working"? Did it work with the same version before? Can you recall any changes you might have made on your computer? Things don't usually break for no reason at all. Do you have any idea about what the reason / change might have been? $\endgroup$
    – Szabolcs
    Commented Jun 16, 2021 at 12:19
  • $\begingroup$ @Szabolcs see my answer below. In this case, it truly suddenly broke because MMA, without user prompting, goes and installs extra resources from the Wolfram servers. This causes a pollution of the namespace resulting in SciDraw no longer working. $\endgroup$
    – Takoda
    Commented Jun 16, 2021 at 12:37
  • $\begingroup$ @Szabolcs If you can't reproduce the error, try running ResourceFunction["MaTeXInstall"][] or similar that requires syncing with the Wolfram Cloud. When I do this, SciDraw immediately breaks when it didn't only a month or so ago. $\endgroup$
    – Takoda
    Commented Jun 16, 2021 at 12:50

2 Answers 2

3
$\begingroup$

I fixed the problem by resetting mathematica to its default configuration and deleting all the directories given in the link below. Note that reinstalling didn't help because it just loaded the configurations from these directories.

https://support.wolfram.com/12464

Update:

The problem is a pollution of the namespace that occurs when Mathematica automatically downloads some Resource functions from the Wolfram servers. I had to reset again manually. Then, I popped open my firewall after MMA has loaded and blocked it! It's really frustrating because the external resource is automatically downloaded without any user input and completely messes up SciDraw.

$\endgroup$
6
  • 1
    $\begingroup$ Have you tried turning off Automatically check for data updates checkbox?: reference.wolfram.com/language/tutorial/… $\endgroup$
    – xzczd
    Commented Jun 16, 2021 at 12:56
  • $\begingroup$ Thank you, I was looking for something like this! Turned it off and have used a couple resource functions. So far, SciDraw hasn't broken! Will update if it breaks. $\endgroup$
    – Takoda
    Commented Jun 16, 2021 at 13:02
  • $\begingroup$ This is strange. sciDraw should be using its own name space for all the name it uses. (i.e. its own context). $\endgroup$
    – Nasser
    Commented Jun 16, 2021 at 15:03
  • 1
    $\begingroup$ Just encountered the same problem in v12.2, Win10. I found we only need to delete the folders in FileNameJoin@{$UserBaseDirectory, "Paclets"} // SystemOpen. I believe we can narrow down even further. $\endgroup$
    – xzczd
    Commented Jun 23, 2021 at 15:41
  • 1
    $\begingroup$ I have sent a report to Wolfram support. What is really annoying is that Mathematica (currently using v11.3 now) still automatically fetches updates from the wolfram server, even when data updates are turned off, thereby ruining scidraw. $\endgroup$
    – Takoda
    Commented Jun 28, 2021 at 8:43
2
$\begingroup$

I encountered this problem as well, and after some digging, I found that the auto-loaded CloudObject paclet is the only thing that is interfering with SciDraw package. so just execute:

SystemOpen@FileNameJoin[{$UserBaseDirectory, "Paclets\\Repository"}]

remove paclet(s) that start with CloudObject, and restart the kernel.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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