1
$\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.

| improve this question | | | | |
$\endgroup$
  • $\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 '19 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 '19 at 18:06
1
$\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).

| improve this answer | | | | |
$\endgroup$
-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.

| improve this answer | | | | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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