Group Abstract Group Abstract

Message Boards Message Boards

Why my code on the Wolfram Programming Cloud failed?

Posted 11 years ago

Today I tried a code on the cloud for parsing html to structured data:

Clear[wikicat]
wikicat:=Module[{URLstr},
                URLstr=URLFetch["http://en.wikipedia.org/wiki/Special:AllPages/Category:Ho"];
                {URLstr//StringLength,ImportString[URLstr,"Data"]}
               ]

It works perfectly in the development Notebook environment of the cloud:

function successes

But when I tried to deploy it by

CloudDeploy[Delayed[wikicat,"String"]]
(* Out[3]= CloudObject[https://www.wolframcloud.com/objects/753a49c8-9fdc-4dbf-a7c1-359f918d68ef] *)

Visiting the corresponding URL gives

cloud failed

As it can be seen, URLFetch successfully got the HTML source string, which has 77028 characters. But somehow ImportString[URLstr,"Data"] failed.

My questions are:

  1. Did I do something wrong?

  2. I've tested that using string pattern match to extract the information is doable, but is there any work-around more elegant and/or compact?

POSTED BY: Silvia Hao
5 Replies

Hi Joel,

Thank you very much for the detailed description. Hope the cloud gets better and better!

POSTED BY: Silvia Hao
Posted 11 years ago

Silvia, glad to see you trying things out!

What you found here is a problem rather particular to this ImportString (of a URL looking for Data) running in an API. It will work fine in a cloud notebook. We know what the issue is and are working on a fix. Thanks for helping us make the cloud environment better.

POSTED BY: Joel Klein

Thanks Bruce!

I'm very excited to see the cloud being launched, and glad I can help!

POSTED BY: Silvia Hao

(1) No.
Thank you for taking the time to post this. Developers are investigating.

POSTED BY: Bruce Miller
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard