google-app-engine

Python UnicodeDecodeError: 'utf8' codec can't decode byte… unexpected code byte

若如初见. 提交于 2020-01-15 18:52:26
问题 Python newbie's journey to build his first webapp (app link: http://contractpy.appspot.com/ - it's just an experimental app). Following an advice of a stackoverflow user, I start to use a template system: Jinja2 (I'm using Python 2.6), but now I'm stucked with this error: 2012-06-17 11:44:39 Running command: "['C:\\Python26\\pythonw.exe', 'C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--admin_console_server=', '--port=8084', 'C:\\Users\\CG\\Documents\\udacity\

Python UnicodeDecodeError: 'utf8' codec can't decode byte… unexpected code byte

天涯浪子 提交于 2020-01-15 18:52:17
问题 Python newbie's journey to build his first webapp (app link: http://contractpy.appspot.com/ - it's just an experimental app). Following an advice of a stackoverflow user, I start to use a template system: Jinja2 (I'm using Python 2.6), but now I'm stucked with this error: 2012-06-17 11:44:39 Running command: "['C:\\Python26\\pythonw.exe', 'C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--admin_console_server=', '--port=8084', 'C:\\Users\\CG\\Documents\\udacity\

Cost of keys-only query compared to get query (google app engine)

风格不统一 提交于 2020-01-15 16:47:08
问题 I've been reading into the cost of datastore calls in the google app engine lately (both in terms of pricing and time). I just have a quick question about a keys-only query vs a get query. If my only concern was to check if an entity exists, I could go about it in two ways: use get and check for an exception, or use a keys-only query and check for the size of the result. If I am to understand this correctly, keys-only queries are free while a get query will cost. Therefore, it would make more

Definitive guide for setting up a Google App Engine app, with domain and sub domain mapping

落爺英雄遲暮 提交于 2020-01-15 15:26:32
问题 I have been used the Google App Engine for multiple hobby projects and I have even published a few of them and setup associated domains with moderate success. Of the few, one of those apps even uses sub-domain mapping. In spite of the multiple setup attempts, I have still had a bit of difficulty setting up my domains for new projects and I've had to cross-reference multiple help articles (many found on SO). Some times those solutions, however, are close to what I've needed because of setup

org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed

泪湿孤枕 提交于 2020-01-15 15:11:08
问题 I am getting the following error message: org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed I have read up on everything I could find on it but I still don't understand what is causing it. I am about to give up and switch to an SQL DB if I cannot resolve this simple issue. Yes I am closing the pm: static void persistAll(Object[] objs) { PersistenceManager pm = PMF.get().getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { tx.begin(); for

org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed

醉酒当歌 提交于 2020-01-15 15:09:50
问题 I am getting the following error message: org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed I have read up on everything I could find on it but I still don't understand what is causing it. I am about to give up and switch to an SQL DB if I cannot resolve this simple issue. Yes I am closing the pm: static void persistAll(Object[] objs) { PersistenceManager pm = PMF.get().getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { tx.begin(); for

Why would I get Login Required for Calendar List Query but not for Calendar Queries

不想你离开。 提交于 2020-01-15 14:14:00
问题 Why would: events = calservice.events().list(calendarId='CAL_ID@group.calendar.google.com', singleEvents='true', showDeleted='false', timeMin='{:%Y-%m-%dT%H:%M:%SZ}'.format(now), timeMax='{:%Y-%m-%dT%H:%M:%SZ}'.format(nowplusonemin)).execute(http=decorator.http()) https://www.googleapis.com/calendar/v3/calendars/CAL_ID@group.calendar.google.com/events?timeMax=2013-06-12T11%3A04%3A09Z&showDeleted=true&alt=json&singleEvents=true&timeMin=2013-06-12T11%3A03%3A09Z work and return me the events for

Why would I get Login Required for Calendar List Query but not for Calendar Queries

孤街浪徒 提交于 2020-01-15 14:12:46
问题 Why would: events = calservice.events().list(calendarId='CAL_ID@group.calendar.google.com', singleEvents='true', showDeleted='false', timeMin='{:%Y-%m-%dT%H:%M:%SZ}'.format(now), timeMax='{:%Y-%m-%dT%H:%M:%SZ}'.format(nowplusonemin)).execute(http=decorator.http()) https://www.googleapis.com/calendar/v3/calendars/CAL_ID@group.calendar.google.com/events?timeMax=2013-06-12T11%3A04%3A09Z&showDeleted=true&alt=json&singleEvents=true&timeMin=2013-06-12T11%3A03%3A09Z work and return me the events for

Searching through Model relationships in Google App Engine?

≡放荡痞女 提交于 2020-01-15 12:35:13
问题 I have 2 models: class Parent (db.Model) : data = db.StringProperty() class Child1 (db.Model) : parent = db.ReferenceProperty(Parent) childData = db.StringProperty() class Child2 (db.Model) : parent = db.ReferenceProperty(Parent) childData2 = db.StringProperty() class Child3 (db.Model) : parent = db.ReferenceProperty(Parent) childData3 = db.StringProperty() .... I want a query which can give me a list of all parents which do not have a child yet. How do i do it? I do not want to maintain an

How do I make a temporary backup of the local datastore in the AppEngine SDK for MacOSX

烈酒焚心 提交于 2020-01-15 12:34:27
问题 How do I make a temporary backup of the local datastore in the AppEngine SDK for MacOSX And where are the files located? 回答1: Search for something called "local_db.bin" If you're using a plugin for Eclipse, you'll find this file in WEB-INF/appengine-generated 回答2: local_db.bin is the database file and it is located in your project directory, just make a copy of it. 来源: https://stackoverflow.com/questions/1734826/how-do-i-make-a-temporary-backup-of-the-local-datastore-in-the-appengine-sdk-for