Message Boards Message Boards

0
|
2607 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Avoid this error while downloading WDF data?

Posted 8 years ago

I just wanted to do some experiments with some WDF data. I was using a line from this blog entry.

The line is:

paintingData=EntityValue[painting//EntityList,"PropertyAssociation"];

It turns out this line apparently downloads all of the data from the KB (for a single entity) into my client. Probably this was not what I wanted...especially after I see it will take 90+ minutes to complete.

At some point while I am waiting, the following error message is issued.

enter image description here

This is Image[] complaining. I have no way to determine which item it is referring to. No stack trace is available.

Then I figured out that my client was hung while it was downloading all the items for this entity, I could not do other operations.

enter image description here

The much better way to handle this case is: 1) use Table[] and RandomEntity[] to get the many fewer items than this line retrieves, and 2) use Map[] to process the attributes you need for your computation, such as:

someItems = Table[RandomEntity@"Island", 35]
yourCoolFunction /@ someItems
POSTED BY: Aeyoss Antelope
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