2
$\begingroup$

This is my code:

  m = Manipulate[
  Show[ListPlot[
  ReIm[Part[Transpose[List @@@ Flatten[Solve[z^n == 1]]], 2]] , 
AspectRatio -> 1 , PlotStyle -> Red]  , Graphics[Circle[]]], {n , 
 2, 100, 1 , Appearance -> "Labeled"} , SaveDefinitions -> True] 

It works fine on the desktop app. I tried to use CloudDeploy:

CloudDeploy[m , Permissions -> "Public"]

It gives the link for the webpage but the slider doesn't work at all. enter image description here

I searched over this site and didn't find similar problem.

$\endgroup$
2
  • $\begingroup$ Are you logged in? You might need to set "Execute" permissions for public users, otherwise. In general I think CloudDeploy makes things not executable so as to prevent you from accidentally losing all your cloud credits. It's also worth noting that there are two views onto any cloud notebook. There's the "Deployed" view and the "Edit" view, each of which you access by slightly different URLs. The deployed view turns off interaction by default I think while the edit view has it on. $\endgroup$
    – b3m2a1
    Aug 22, 2019 at 18:02
  • $\begingroup$ @b3m2a1 Yes I'm logged in. How should I set "Execute" permissions for public users? And how to turn on edit mode? $\endgroup$
    – S.H.W
    Aug 22, 2019 at 18:06

2 Answers 2

3
$\begingroup$

It works nicely when I try it, using

m = Manipulate[
  Show[ListPlot[
    ReIm[Part[Transpose[List @@@ Flatten[Solve[z^n == 1]]], 2]], 
    AspectRatio -> 1, PlotStyle -> Red], Graphics[Circle[]]], {n, 2, 
   100, 1, Appearance -> "Labeled"}, SaveDefinitions -> True]

CloudDeploy[m, Permissions -> "Public"]

exactly as you wrote. Here's the resulting cloud object: https://www.wolframcloud.com/obj/fe1124af-056d-4051-a34c-813fce494254

Is there any chance you were out of cloud credits when you tried this originally? That could have resulted in disabled interactivity. That being said, we're changing our policy so that publicly deployed notebooks do not necessarily consume cloud credits anymore. In other words: Publishing notebooks is free and you don't usually have to worry about credits.

You can check your available cloud credits by evaluating $CloudCreditsAvailable.

Also, there's a short period of time, while the notebook is loading (usually not more than a few seconds), during which it displays in static form. We call this the "prerendered HTML cache" of the notebook, before "live rendering" kicks in. It is expected that there's no interactivity during this time, but the notebook should become interactive eventually. I assume that's not the problem you saw (i.e. it never became interactive for you).

To answer a follow-up question in the comment thread: Permissions->"Public" is equivalent to Permissions->{All->{"Read", "Interact"}} (for notebooks). "Interact" permission is the only capability required for interactivity in deployed notebooks. "Execute" is not relevant for notebooks (only for other "active" cloud objects such as APIFunction and FormFunction, which need a kernel evaluation to display).

$\endgroup$
1
  • $\begingroup$ I have cloud credit of 25000 but I do not know what it means. Also, do you know how to get more credit? $\endgroup$ Feb 20, 2021 at 18:27
-1
$\begingroup$

You need to use EmbedCode@CloudDeploy[ instead of CloudEmploy[, Alternatively, just upload your code for m to your Cloud account and then click on Publish. This will provide you with a link which you can copy to a browser.

$\endgroup$
0

Your Answer

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

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