TransWikia.com

What is it that breaks CreateUUID in Mathematica 10.4.1 and how can I fix it?

Mathematica Asked by Albert Retey on August 22, 2021

All of a sudden my Mathematica 10.4.1 installation which worked well for several years does behave very strange. For example when I evaluate:

CreateUUID[]

this either returns unevaluated or creates a bunch of error messages about cloud connections. My suspection is that this is related with the paclet CloudObject-12.1.28. If I delete that it will be recreated and depending on whether I do a PacletManager`RebuildPacletData after that I either see error messages about some Cloud functionality or CreateUUID returns unevaluated. This started on three independent computers last night, so I suspect that it is not a broken installation but somehow related to changes in the WRI server setup. There seem to be other functions which create similar problems and cause some of my automated scripts to fail, but so far I haven’t been able to locate which functions these are.

My question is: Does anyone see similar problems or has an idea how I can fix this?

Here are the error messages for reference:

SetDelayed::wrsym: Symbol CloudObject`Internal`$ActiveCloudConnection is Protected. >>

Set::wrsym: Symbol $WolframCloudBase is Protected. >>

Attributes::locked: Symbol $WolframCloudBase is locked. >>

SetDelayed::write: Tag CloudObjectInformationData in MakeBoxes[BoxForm`a_CloudObjectInformationData,BoxForm`fmt_] is Protected. >>

TagSetDelayed::write: Tag PermissionsGroup in DeleteObject[grp_PermissionsGroup] is Protected. >>

TagSetDelayed::write: Tag PermissionsKey in DeleteObject[key_PermissionsKey] is Protected. >>

 CloudFunction::nonopt: Options expected (instead of opts:OptionsPattern[]) beyond position 2 in CloudFunction[fn:Except[_Failure],head_:(##1&),opts:OptionsPattern[]]. An option must be a rule or a list of rules. >>

One Answer

As this is about a legacy version only I doubt there will be much interest from other users or WRI to have a closer look so the best answer I probably can expect is the workaround I found.

It looks like there is no real problem except for these messages which are all about redefinitions of protected symbols or definitions which don't work when there are other definitions for the same symbol already existing. Both are shown because for some yet unknown reason the "CloudObject`"-package is obviously loaded twice, presumingly because the code responsible for loading paclets in general or the "CloudObject`"-package in particular has changed in some way between version 10 and newer versions.

To suppress the warning messages (and make my automated tests which contain checks for messages) it seems to be good enough to once do:

  Quiet[Block[{$ContextPath}, Needs["CloudObject`"]]];

before my tests starts and everything then works as expected, this suppresses the messages and also guarantees that the CreateUUID function will work as expected.

Answered by Albert Retey on August 22, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP