开发者

Memory error in GAE python

I bulkloaded to the data store 88 entities, each one is composed from a unicode field (name), and a list field (lst) of 4996 numbers. The bulk loader section of the list looks like this:

property: lst

  external_name: lst

  Type: List
  import_transform: "lambda x:x.split()"

After the import I could see in the data store view开发者_JAVA技巧er all the entities. When I try to run this code:

def an(x): 
    return x.name

class Name(db.Model):
    name=db.StringProperty(unicode)
    lst=db.ListProperty(int)

    class Calc(webapp.RequestHandler):

       def get(self):

           begin=Name.all()

           self.response.out.write('<html><body>')

           self.response.out.write(" ".join(map(an,begin))) 

           self.response.out.write('</body></html>')

I got a memory error. When I erased most of the entities from the data store, and only few left it worked OK. I added few more and I got memory error again.

Do I have to import csv files with 10 entities each, or can I import any number of entities in the file?

what did I do wrong anyway?

I'm a newbie in GAE, so please be patient. Any help will be appreciated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜