I am using the online Mathematica Cloud. I have one complete package(in this case, a group theory-related mathematics package), which is saved locally as a ZIPed folder. The ZIPed folder contains numerous ".m" files organized into smaller folders. I want to upload the whole folder into Mathematica Cloud and then extract it to use the package.

I successfully extracted the ZIPed file and got all the directories.GroupMath is one of the '.m' files in the ZIPed folder. When I am running :


**Then I get an error message:** "TemplateBox[{"Needs", "cxt", "\"\:f7c1\:f7c9\:f7c8RowBox[{\"\\:f3b5Invalid context specified at position \", StyleBox[TagBox[\"1\", Function[Short[Slot[1], 5]]], ShowStringCharacters -> False], \" in \", StyleBox[TagBox[RowBox[{\"Needs\", \"[\", \"\\\"wolframcloud/userfiles/cb3/cb39fb70-723f-4917-a180-0292e9ac493e/GroupMath`\\\"\", \"]\"}], Function[Short[Slot[1], 5]]], ShowStringCharacters -> False], \". A context must consist of valid symbol names separated by and ending with \", StyleBox[TagBox[\"\\\"`\\\"\", Function[Short[Slot[1], 5]]], ShowStringCharacters -> False], \".\\:f3b5\"}]\:f7c0\"", 2, 99, 54, 29410967662186854558, "Local"}, "MessageTemplate"] "

If I write: Needs["GroupMath"]`

Then I get:

SetDelayed :TagBlockDiagonalMatrixinBlockDiagonalMatrix[blocks_]isProtected.

Set :Cannotassigntorawobject2.

Set :Cannotassigntorawobject2.

Set :Cannotassigntorawobject2.

General :FurtheroutputofSet::setrawwillbesuppressedduringthiscalculation.

What is going on? Can someone Explain.

  • $\begingroup$ Does the online version follow a similar folder structure to the desktop version? If so, there should be an "Applications/" directory in which you can save your package. The syntax for loading with Needs is Needs["context`"]. Note the back-tick goes inside the double quotes and closing bracket You placed yours outside the trailing bracket. The reason the first attempt failed is likely due to the fact that Needs is taking the full path as the context name. $\endgroup$
    – user87932
    Mar 17, 2023 at 2:27
  • $\begingroup$ I found a related question which might help:mathematica.stackexchange.com/questions/91194/… $\endgroup$
    – user87932
    Mar 17, 2023 at 2:45
  • $\begingroup$ Also closely related: mathematica.stackexchange.com/a/175586/5478 $\endgroup$
    – Kuba
    Mar 22, 2023 at 8:04


Your Answer

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