7
$\begingroup$

I have spent several frustrating hours trying to store a 15MB list of numbers using CloudDeploy, with no success. Here is my code with a small list:

data = {1, 2, 3};
URLShorten[CloudDeploy[data, "List", Permissions -> "Public"]]

But when I try to download the data, it no longer acts like a list of numbers:

cyclesperday = CloudImport["https://wolfr.am/vH2xiTJZ", "List"]
listdata = Flatten[cyclesperday]
$\endgroup$
7
  • 1
    $\begingroup$ This appears to be a new bug in the cloud :) It should work fine without any type argument so I think something's just glitchy. $\endgroup$
    – b3m2a1
    Jun 27 '18 at 23:02
  • $\begingroup$ Thanks! It works when "List" is replaced by "Package". $\endgroup$ Jun 27 '18 at 23:08
  • 1
    $\begingroup$ Good to hear, although it really should be working without any argument. Dunno what's wrong with it. $\endgroup$
    – b3m2a1
    Jun 27 '18 at 23:34
  • 1
    $\begingroup$ It might be a good idea to report this to Wolfram then. If it is a real bug, then they can work on it. $\endgroup$
    – halirutan
    Jun 28 '18 at 1:57
  • 1
    $\begingroup$ Would you consider moving this information into an answer? I think it is quite helpful and there is absolutely nothing wrong with answering a question yourself. $\endgroup$
    – halirutan
    Jun 29 '18 at 0:23
3
$\begingroup$

Here is what Wolfram Tech Support advised:

For applications like this, I would recommend CloudPut and CloudGet: (http://reference.wolfram.com/language/ref/CloudPut.html) (http://reference.wolfram.com/language/ref/CloudGet.html).

co = CloudPut[{1, 2, 3}, Permissions -> "Public"];  
CloudGet[co] 
{1, 2, 3}

The "List" Import/Export format imports a text file, returning each line as a string or a number. Because "{1,2,3}" in this case is on one line, and is not a number, it is imported as a string. In short, the "List" Import/Export format isn't for Wolfram Language expressions, but instead better suited for individual numbers/strings.

Here is one more piece of helpful advice from Wolfram Tech Support:

CloudPut doesn't store the variable name, only the data. As such you'll need to reassign the variable when performing your CloudGet, if you want to use the same variable names:

cyclesamples = CloudGet["https://www.wolframcloud.com/objects/heaneym/cyclesamples"];
forcedata = CloudGet["https://www.wolframcloud.com/objects/heaneym/forcedata"];
$\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.