Message Boards Message Boards

c=Classify[{Import["img/*"]->FileNames["img/*"]}] timeout?

Posted 9 years ago
c=Classify[{Import["img/*"]->FileNames["img/*"]}]

Could someone be so kind as to suggest why the above statement always gives: "The server is experiencing unexpected issues and could not process your request. Please try again in a few minutes". The "img" directory had 1,200 jpg's. So I reduced it to 200 jpg's and got the same error after less than 3 minutes. Finally, I reduced it to 2 jpg's and it worked. So it seems to be hitting an extremely short timeout limit. I tried adding "TimeConstraint ->3600" but got the same error. I'm using a paid account (Explorer) on Programming Cloud. Thanks!

POSTED BY: ai dev
2 Replies
Posted 9 years ago

Thanks so much for all the tips. You asked what result I'm expecting? I'm expecting the ClassifierFunction to display, like it does when I only have two jpg's in the directory. And since the directory only has jpg's (no gif's or subdirectories),

c=Classify[{Import["img/*"]->FileNames["img/*"]}]

seems to work fine (at least on two images). Nonetheless, I tested your suggested

Map[Import[#] &, CloudObjects["/img"]]

and got the same "The server is experiencing unexpected issues and could not process your request. Please try again in a few minutes" error with 200 jpg's in the directory. So it seems to be hitting an extremely short timeout limit of 2-3 minutes. Could you be so kind as to suggest how to increase that?

POSTED BY: ai dev

I have uploaded 4 images to test this. I am not sure what the result is you expect but maybe these directions help:

FileNames["/img/*", {"."}]]

This results in more than 4 answers. A file .gif can also have a .lock version. So the numbers left and right of your rule are not the same. The {"."} is necessary to search in the img directory and not deeper.

Use

CloudObjectInformation[#,"Name"]& /@ CloudObjects["/img"] 

to get a list without double entries.

To read/import the in my case 4 picture files you can use:

Map[Import[#] &, CloudObjects["/img"]]

CloudObjects[] can be used in the web-interface.

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

Group Abstract Group Abstract