Mention Google Groups and get an additional 1000 hits to your website!
-- Forwarded message -- From: Nanci Casson [EMAIL PROTECTED] Date: Tue, Sep 9, 2008 at 11:03 AM Subject: Mention Google Groups and get an additional 1000 hits to your website! To: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], Dont-be-scared-to-try-a-new-bizness@googlegroups.com, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Need more traffic to your site? Look no more, we can help! Our traffic exchange is rapidly becoming the most responsive and fastest growing on the net. Mention Google Groups in a support ticket after signing up and get an additional 1000 hits to your website! Your site will be shown on 10 other traffic exchanges! Look at what we have to offer! Solo Ads Travel, Savings and Shopping Certificates Buy, Sell and Trade Credits First Page Auctions Downline Builder Referral Tracker Link Tracker Partnerships with 10+ Traffic Exchanges Games Banner Ads Text Ads And so more! Get a free upgrade to the next membership level when you get 5 active referrals! Check it out. http://www.trafficzone.biz?r=57974 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Don't be scared to try a new bizness group. To post to this group, send email to Dont-be-scared-to-try-a-new-bizness@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Dont-be-scared-to-try-a-new-bizness?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Upload Post image app engine
My apologies for that Davide, this is the corrected one http://code.google.com/p/rive/source/browse/trunk/RivePython/rive/src/server/main.py Now I don't get any errors, thanks for helping in that. But that's also it...I don't get any response at all? From my flash client I do a filereference upload of a countries flag image - don't get security errors - don't get file IO errors - don't get any other error, eveything works correct and I DO get a full progress event - But i do NOT get an UPLOAD_COMPLETE_DATA event or an inserted row in my datastorage at App Engine? P.S.: The same client side filereference upload works fine to a similar PHP script. On Sep 9, 9:42 pm, Davide Rognoni [EMAIL PROTECTED] wrote: I see the mapping for ('/', MainPage) but where is the mapping for CountriesService, for example: ('/countries', CountriesService) and can you use only get and post in the CountriesService handler? . . . . -- Best Template Enginehttp://pyoohtml.appspot.com/best-template-engine . . . . On Sep 8, 9:47 am, rive [EMAIL PROTECTED] wrote: WellDavide, this is my main app.py I'm usinghttp://code.google.com/p/rive/source/browse/trunk/RivePython/rive/src... And this is my upload script (from line 9-19):http://code.google.com/p/rive/source/browse/trunk/RivePython/rive/src... Did I do something wrong in my main.py file then? On Sep 6, 10:53 am,DavideRognoni[EMAIL PROTECTED] wrote: Post here your main app.py file: def main(): application = webapp.WSGIApplication([ ('/', home.handler.Home), ... -- Best Template Enginehttp://pyoohtml.appspot.com/best-template-engine On Sep 5, 3:23 pm, rive [EMAIL PROTECTED] wrote: I do an multipart post to http://rive.appspot.com/services/ CountriesService.py But I keep getting 400 bad requests back?? The file is really online. This is the server side file I have online. (the same client side code works perfect with PHP) from google.appengine.api import images from google.appengine.api import users from google.appengine.ext import db from google.appengine.ext import webapp from Model import tblMapCountries, DTO class CountriesService(webapp.RequestHandler): def post(self): if users.is_current_user_admin(): country = tblMapCountries() country.country = self.request.get(country) uploadimage = images.resize(self.request.get(Filedata), 25, 20, images.PNG) country.flag = db.Blob(uploadimage) country.put() return inserted in db app engine else: return kiekeboe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: dev_appserver.py doesn't create index.yaml and manual index.yaml isn't recognized
I think the dev appserver does not create indexes if run in strict mode. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: debugging application
You can use the logging module and also pass -d to dev_appserver.py. That will give you more detailed ourput for each request. 2008/9/9 Aramaki [EMAIL PROTECTED] Hi. Firstable say i'm absolutly new in python so maybe my question will seem a nooby question I´m writting a short application as a way to get used to python. I come from Java and I have installed Pydev plugin on my eclipse ide to make it easier for me to get used, But running applications with the google SDK make debugging a nightmare for me. Firstable I can´t put breakingpoints neither run the application in debug mode son I am using a selfmade class to output some intermediate and check results in html an so control my application flow. This way is of course not user friendly and I am spending a lot of time checking classes that otherwise with a breakpoint should be debugged in 5 minutes Can anybody give me an advice about debugging applications for google apps and ides to use. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: debugging application
Thank you guys, This information is exactly what I was asking for. My mistake was starting the application with a .bat file so eclipse engine whas not configured. Thanks a lot --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Having trouble using my own domain name with app engine
Jan and I have discussed this already, but for the record and anyone else who struggled with this (like me). It seems you cannot have two duplicate prefixes, even if the complete URLs are different. Look on the Dashboard of your Google Domain for an App in your that uses www as a prefix (like Google Web Pages) and rename it to something else. On Sep 3, 4:36 pm, Jan de Wild [EMAIL PROTECTED] wrote: thanks for your reaction. my problem is that i can t add the www subdomain too point to my app if i enter www in google apps it is not added to the list of subdomains , no warning noting. sorry for my bad english On 29 aug, 19:10, Tony Smith [EMAIL PROTECTED] wrote: you don't need to remove your domain from google apps. Instead add the appengine application to your domain via the dashboad in GAE. It will ask you to login with you admin for your domain. Then add the url that you want to use for the application (app.yourdomain.com). See this article for more info:http://www.google.com/support/a/bin/answer.py?hl=enanswer=91080 It worked perfectly for me. On Aug 27, 4:55 pm, Polyakov,Oleg V [EMAIL PROTECTED] wrote: I followed getting started instructions for creating an application with app engine, and it works. (http://spobby.appspot.com/) Now, I am trying to map this to the domain name that I bought from Yahoo. I tried following instructions on the Google Apps for Administratorshttp://www.google.com/support/a/bin/answer.py?answer=91077useful=0s... However, this doesn't work for me. 1) I already registered with Google Apps for spobby.com account. 2) When I go tohttp://appengine.google.com/deployment/newdomain?app_id=spobby, and enter spobby.com, then click on Add domain button, it will try to register me for http://spobby.spobby.cominsteadofhttp://spobby.com Two possible resolutions that I have in mind: 1) Remove myself from google apps for spobby.com account, not sure how to do it, and try repeating steps again. 2) Somehow add CNAME and Name Servers in my yahoo control panel for google account. I don't know values for cname and name servers. Please advice me what I am missing. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Any (event the slightest) idea when free account limits will be lifted and we will be able to pay for storage etc?
Any (event the slightest) idea when free account limits will be lifted and we will be able to pay for storage etc? Some of us have been developing apps for GAE since the very beginning and would like to launch them for real... without the current limitations on storage, file uploads, etc. The limitations of the preview release precludes the release of many apps that, for example, need to store lot of binary content in data store. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Query filter based on the Longitude attribute of a db.GeoPt property
Thanks for the follow-up. I guess one could still use the geotoken (my own term) idea, but only save one token (map-graph-square) per saved point. Then, when someone searches on a given point, tokenize the search point, search for anything that shares the same token, and then go back for for data in the surrounding tokens. In my example, that means 9 DB calls instead of one, but that's pretty manageable... I don't know how it scales if you want to have greater variability in your search range, but you could either define your tokens to cover more ground, or increase the number of tokens searched. Looking at the current quota limits, with 2.5 million datastore requests per day, I could handle 200,000 searches per day (250,000 * 9 = 2.45 million), which leaves room for 50,000 posts per day (one datastore operation per post), all under quota. Once this turns into a paid service, if I have to pay for more than that, I think I'll be happy to do so. -B On Sep 9, 2:52 pm, uprise78 [EMAIL PROTECTED] wrote: The exploding index issue can occur with list properties readily. Properties with multiple values, such as using a list value or a ListProperty model, store each value as a separate entry in an index. With a 9 element list you just created 9 indexes. If you expand the box to get some more resolution such as the 13 box example, you will then have 13 indexes on that property alone. You can see where this is going. It gets compounded if you even 1 single other list element in your model. If you had another list element with just 2 records you would have a total of 20 indexes (18 for the 2 lists and then 2 for the basic indexing). This causes a number of issues. The two you pointed out, updating and data storage. Updating has to hit each and every index so updates would be a huge bottleneck if the model is updated often. The other issue is (and correct me if I'm wrong on this anyone with more experience) is that because lists are stored as separate entities Big Table has to do multiple queries to return your result set. A bit of testing would probably be a good idea to see what the speed is. If you have a small dataset, you definitely won't have an issue. Check out this: http://code.google.com/appengine/docs/datastore/queriesandindexes.htm... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Help with mapping request RegEx's to RequestHandlers
While not *exactly* what you are looking to do you can quite easily do what you would like using the example below and an if statement. Try this: def StuffHandler(webapp.RequestHandler): def get(self, CatDogOrFish): self.response.out.write('you wanted to eat the: %s' % CatDogOrFish) application = webapp.WSGIApplication( [('/(Cat|Dog|Fish)', StuffHandler) ]) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Lots of Datastore timeouts today - what keeps causing these?
A more general question first: my app has been experiencing more than 20 datastore write timeouts per day on average with an average of approx. 30K daily data write requests. I understand that it's only a 0.07% failure rate, but that's still too high for my liking. Some of my users' data has already been corrupted because my code didn't foresee every possible fault scenario. I've been spending lots of time trying to make my code and data bulletproof over the past month but it's an uphill battle. I'd like to know more about the cause of these mysterious failures. They mostly happen on data writes (in my case on Entity.save and Entity.get_or_insert), but sometimes also reads (in Entity.get_by_key_name). Could they be recovered if App Engine allowed waiting longer than 4000 ms? Or is it fatal when you've already waited this long? (when the same request succeeds, it does so under 200ms) It would be really awesome if App Engine could provide more fault- tolerance. Perhaps App Engine could time out these things sooner and do a couple of retries automatically before throwing an exception? It's too late for the handler code to trap these exception and retry, right? It's pretty frustrating seeing my logs filled with these errors and have to keep worrying about the affected users. Now regarding today: almost a hundred datastore timeouts between 9:30 and 9:41 am. Relevant stack trace: File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 618, in put return datastore.Put(self._entity) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 162, in Put raise _ToDatastoreError(err) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 1627, in _ToDatastoreError raise errors[err.application_error](err.error_detail) Timeout --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Can't create application
I signed up for an account a while ago and did the sms verification. Now when I log in it asks to verify again using sms but now it won't let me, says I have already authenticated with this phone number or something to this effect. How do I go about creating an app now and why is it asking me to re- authenticate with sms when it has already done it before? It obviously knows it has since it is telling me this number has been used for authentication before. --- Shidan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Query against EnitiyGroup that returns a list of Objects of various kinds/types? (Factory Pattern)
Hi Thomas, Your observation is correct, each query can only retrieve entities of a single kind at the moment, so you would need to perform a separate query for each subclass. Your solution of using just the one Base class with additional properties sounds like a very reasonable solution. Happy coding, Jeff On Sep 8, 11:49 am, Cat [EMAIL PROTECTED] wrote: I am using a factory pattern to model my data. Creating the data is simple. Retrieving it is hard. class Owner() class Base(db.Model) group = StringProperty(default=abc) @classmethod def factory(): ... class Sub1(Base) class Sub2(Base) Problem: I want to query for all classes with ancestor == owner (and group == 'abc'). So to say run a query against a whole entity group. However it appears I can only retrieve a Kind/Class at a time? Base.all().ancestor(owner).fetch(100) will only return Base instances not Sub1 and Sub2 Sub1.all().ancestor(owner).fetch(100) will only return Sub1s Question: Is there any query that could return mixed type lists? Some solutions I can think of is * to add a 1000 item ListProperty(RefereneProperty) to Owner ... needs to be filtered manually by group (slow?) * to use Base(Expando) with a type property instead using subclasses ... loose some prop checking Is there a better way to do that? Thanks, Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Couldn't import gdata.calendar.service
Hi moparthi, I thought of a few suggestions that might help. The first is that the atom and gdata directories from the gdata-python-client/src directory need to be included in the top level directory for your app. The gdata library source code will needs to be uploaded as part of your app. This is my first guess as to why the imports would fail. Also, there is an additional line which you must add to your code to tell the gdata library that HTTP requests should use the App Engine urlfetch API (since the default for the gdata library uses raw socket connections which are not allowed in App Engine). In the latest version of the gdata-python-client (version 1.2.0) you would do this: import gdata.alt.appengine ... self.cal_client = gdata.calendar.service.CalendarService() gdata.alt.appengine.run_on_appengine(self.cal_client) Lastly, I noticed that you are using ClientLogin, which requires a username and password, and these are being passed around in plaintext. I strongly recommend that you switch to using AuthSub authorization instead. I've written an article which explains how to use AuthSub with App Engine which you can find here http://code.google.com/appengine/articles/gdata.html Let me know how it goes :) Jeff On Sep 9, 12:34 am, moparthi [EMAIL PROTECTED] wrote: hi, I tried to use calendar service in cgi-script. This is my code try: from xml.etree import ElementTree except ImportError: from elementtree import ElementTree import gdata.calendar.service import gdata.service import atom.service import gdata.calendar ##import atom ##import getopt ##import sys ##import string import cgi, sys import cgitb; cgitb.enable() # for troubleshooting import time ##print Content-type: text/html ## ##print ## html ## ## headtitleSample Script/title/head ## ## body ## ## h3 Sample CGI Script /h3 ## sys.stderr = sys.stdout html = pPrevious message : %s/p p Time is %s/p p Age is %s/p form action= method=post Enter the User name : input type=text name=messagebr/ Enter the Password nbsp;: input type=password name=age Select a value : select name=dropdown option value=REDred/option option value=ORANGEorange/option option value=BLUEblue/option /select input type=submit value=Submit /form /body /html class CalendarExample: def __init__(self): print 'In Class' print You're talking to a %s server. % (sys.platform) print Version is %s % (sys.version) print br/Path is %s % (sys.path) def login(self, email, password): Creates a CalendarService and provides ClientLogin auth details to it. The email and password are required arguments for ClientLogin. The CalendarService automatically sets the service to be 'cl', as is appropriate for calendar. The 'source' defined below is an arbitrary string, but should be used to reference your name or the name of your organization, the app name and version, with '-' between each of the three values. The account_type is specified to authenticate either Google Accounts or Google Apps accounts. See gdata.service or http://code.google.com/apis/accounts/AuthForInstalledApps.htmlfor more info on ClientLogin. NOTE: ClientLogin should only be used for installed applications and not for multi-user web applications. print h1Hello/h1 print pId is %s % (email,) print pPassword is %s % (password,) self.cal_client = gdata.calendar.service.CalendarService() self.cal_client.email = email self.cal_client.password = password self.cal_client.source = 'Google-Calendar_Python_Sample-1.0' self.cal_client.ProgrammaticLogin() def main(): form = cgi.FieldStorage() message = form.getvalue(message, ) age = form.getvalue(age, ) now = time.gmtime() displayedtime = time.strftime(%A %d %B %Y, %X, now) contentheader = Content-type: text/html print contentheader print html % (message, displayedtime, age) sample = CalendarExample() sample.login(message, age) if __name__ == '__main__': # print '\n Main If condition' main() when i tried to run in google app engine using command dev_appserver.py cgi it showing an error as importerror : No module named gdata.calendar.service can anyone help me how to use calendar service with cgi regards, moparthi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: dev_appserver.py doesn't create index.yaml and manual index.yaml isn't recognized
By strict mode, you mean --require_indexes? On Sep 10, 1:55 am, Cat [EMAIL PROTECTED] wrote: I think the dev appserver does not create indexes if run in strict mode. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] How do I handle forms with django?
Hi folks, I'm trying to post some data from a form and then do something with it. But I'm hitting issues. I'm using the django version that comes with appengine. My models.py has from django import forms class MessageForm(forms.Form): message = forms.TextField() and my views.py has from myapp.models import MessageForm This causes the app to crash with the error message Exception Type: ViewDoesNotExist Exception Value:Tried message in module myapp.views. Error was: 'module' object has no attribute 'Form' Any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Query filter based on the Longitude attribute of a db.GeoPt property
Since starting this thread, I've come up with something slightly similar to what you are suggesting here. Rather than store metadata about both lat and lng, I store a ListProperty of lngs to differing degrees of accuracy, and still use inequalities for latitude. So if you have a point with Lat, Lng = 12.12345678, 40.12345678, my stored lng-list property would look like: [40, 40.1, 40.12, 40.123]. This way, based on zoom level (well, actually just based on the size of the viewport, calculated when the query is run), I can query for all of the strips of longitude within my viewport, and then still include a minLat lat minLng. This results in a single query up front, but multiple queries behind the scenes, since the viewport will have many longitude strips and thus I will be comparing the lng-list to an array of values. I decide how to divide up the viewport based on the difference in longitude between either edge, and limit the number of strips to 10 (using the larger strips in order to decrease the number). Here is the code for encoding and generating the array for the query: import decimal from decimal import Decimal as d import logging def LngList(lng): returns array of truncated lng strings lnglist = [] lnglist.append(__truncate(lng, 0)) lnglist.append(__truncate(lng, 1)) lnglist.append(__truncate(lng, 2)) lnglist.append(__truncate(lng, 3)) return lnglist def ViewportLngs(minLng, maxLng): returns array of lngs that exist in the viewport, with the right degree of precision vislngs = [] dif = abs(maxLng - minLng) if minLng maxLng: logging.info(minLng: %s maxLng: %s %(minLng, maxLng)) dif = (180 - minLng) + abs(-180 - maxLng) if dif .01: vislngs = __makelist(3, minLng, 180) + __makelist(3, -180, maxLng) elif dif .1: vislngs = __makelist(2, minLng, 180) + __makelist(2, -180, maxLng) elif dif 1: vislngs = __makelist(1, minLng, 180) + __makelist(1, -180, maxLng) else: logging.error(Viewing both sides of the dateline, zoomed out.) elif dif .01: vislngs = __makelist(3, minLng, maxLng) elif dif .1: vislngs = __makelist(2, minLng, maxLng) elif dif 1: vislngs = __makelist(1, minLng, maxLng) else: # zoomed out case logging.error(The LngList method is being used on a viewport with a range larger than 1 degree.) return vislngs def __makelist(level, minLng, maxLng): actually populates the list of longs, based on conditions passed in, and accounts for extreme near-zero cases. inc = 10**-level lng = __truncate(minLng, level) maxL = __truncate(maxLng, level) vislngs = [lng] while lng != maxL: if lng == 0: return __makelist(level + 1, minLng, maxLng) lng = __truncate(float(lng)+inc, level) vislngs.append(lng) return vislngs def __truncate(num, prec): truncates the float passed in to _prec_ places after the decimal, and returns it as a string result = unicode(d(str(num)).quantize(d(1e%d % (-prec)), decimal.ROUND_DOWN)) if result == u'-0.0': result = u'0.0' if result == u'-0.00': result == u'0.00' return result This method seems to preform pretty well, though I don't yet have gobs of data. I am able to run a query that returns 3-400 markers and load them all up in less than a second. Unfortunately, this doesn't account for Polylines and Polygons. We're still working on an elegant solution for those, probably similar to your method of storing the grid-boxes each one overlaps. Exploding indexes, here I come. Nevin On Sep 10, 10:11 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks for the follow-up. I guess one could still use the geotoken (my own term) idea, but only save one token (map-graph-square) per saved point. Then, when someone searches on a given point, tokenize the search point, search for anything that shares the same token, and then go back for for data in the surrounding tokens. In my example, that means 9 DB calls instead of one, but that's pretty manageable... I don't know how it scales if you want to have greater variability in your search range, but you could either define your tokens to cover more ground, or increase the number of tokens searched. Looking at the current quota limits, with 2.5 million datastore requests per day, I could handle 200,000 searches per day (250,000 * 9 = 2.45 million), which leaves room for 50,000 posts per day (one datastore operation per post), all under quota. Once this turns into a paid service, if I have to pay for more than that, I think I'll be happy to do so. -B On Sep 9, 2:52 pm, uprise78 [EMAIL PROTECTED] wrote: The exploding index issue can occur with list properties readily. Properties with multiple values, such as using a list value or a ListProperty model, store each value as a separate entry in an index. With a 9 element list you just created 9 indexes. If you expand the box to get some more resolution such as the 13 box example, you will then have 13
[google-appengine] Timeout - operation took too long
Hi, I'm seeing a number of Timeout errors on my log file: Traceback (most recent call last): File /base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py, line 496, in __call__ handler.get(*groups) File /base/data/home/apps/40tazo/2.29/index.py, line 46, in get moves = g.move(card,pickups) File /base/data/home/apps/40tazo/2.29/game.py, line 231, in move self.save() File /base/data/home/apps/40tazo/2.29/game.py, line 290, in save self.g.put() File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 618, in put return datastore.Put(self._entity) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 162, in Put raise _ToDatastoreError(err) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 1627, in _ToDatastoreError raise errors[err.application_error](err.error_detail) Timeout: datastore timeout: operation took too long. In this thread: http://groups.google.com/group/google-appengine/browse_thread/thread/5bb4e0bca36c8d9e, someone describes a similar problem and Jeff Scudder reply that we should spect some increase latency until Tuesday 9/2. Is this increased latency still an issue? If that's not the case, any suggestions about how to troubleshoot this issue? Greetings Ronald --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Timeout - operation took too long
Hi, Our engineering team is currently investigating increased datastore latency from earlier today. More details will be posted in the downtime-notify group. -Marzia On Wed, Sep 10, 2008 at 1:16 PM, Ronald [EMAIL PROTECTED] wrote: Hi, I'm seeing a number of Timeout errors on my log file: Traceback (most recent call last): File /base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py, line 496, in __call__ handler.get(*groups) File /base/data/home/apps/40tazo/2.29/index.py, line 46, in get moves = g.move(card,pickups) File /base/data/home/apps/40tazo/2.29/game.py, line 231, in move self.save() File /base/data/home/apps/40tazo/2.29/game.py, line 290, in save self.g.put() File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 618, in put return datastore.Put(self._entity) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 162, in Put raise _ToDatastoreError(err) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 1627, in _ToDatastoreError raise errors[err.application_error](err.error_detail) Timeout: datastore timeout: operation took too long. In this thread: http://groups.google.com/group/google-appengine/browse_thread/thread/5bb4e0bca36c8d9e , someone describes a similar problem and Jeff Scudder reply that we should spect some increase latency until Tuesday 9/2. Is this increased latency still an issue? If that's not the case, any suggestions about how to troubleshoot this issue? Greetings Ronald --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Lots of Datastore timeouts today - what keeps causing these?
Hi Alex, Our engineering team is currently investigating increased datastore latency from earlier today. More details will be posted in the downtime-notify group. -Marzia On Wed, Sep 10, 2008 at 10:36 AM, Alex Epshteyn [EMAIL PROTECTED] wrote: A more general question first: my app has been experiencing more than 20 datastore write timeouts per day on average with an average of approx. 30K daily data write requests. I understand that it's only a 0.07% failure rate, but that's still too high for my liking. Some of my users' data has already been corrupted because my code didn't foresee every possible fault scenario. I've been spending lots of time trying to make my code and data bulletproof over the past month but it's an uphill battle. I'd like to know more about the cause of these mysterious failures. They mostly happen on data writes (in my case on Entity.save and Entity.get_or_insert), but sometimes also reads (in Entity.get_by_key_name). Could they be recovered if App Engine allowed waiting longer than 4000 ms? Or is it fatal when you've already waited this long? (when the same request succeeds, it does so under 200ms) It would be really awesome if App Engine could provide more fault- tolerance. Perhaps App Engine could time out these things sooner and do a couple of retries automatically before throwing an exception? It's too late for the handler code to trap these exception and retry, right? It's pretty frustrating seeing my logs filled with these errors and have to keep worrying about the affected users. Now regarding today: almost a hundred datastore timeouts between 9:30 and 9:41 am. Relevant stack trace: File /base/python_lib/versions/1/google/appengine/ext/db/ __init__.py, line 618, in put return datastore.Put(self._entity) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 162, in Put raise _ToDatastoreError(err) File /base/python_lib/versions/1/google/appengine/api/ datastore.py, line 1627, in _ToDatastoreError raise errors[err.application_error](err.error_detail) Timeout --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Hidden Security Risks through App Caching
I think it's a feature of the python syntax that all instance attributes have to be referenced by self. In Java you get the help from eclipse to mark class variables (by writing them italic). Otherwise it coud be difficult to recognize them, too. I like this feature of python that you are forced to write all instance variables of a class with self.variable. With an unterstanding of oo programming should be no problem. Regards Olli On Sep 10, 12:31 pm, Waldemar Kornewald [EMAIL PROTECTED] wrote: On Sep 10, 10:49 am, Cat [EMAIL PROTECTED] wrote: # could be an error message to be inserted into any next page that will be creaed Page.message += world # Notice: Page, not p p = Page() print p.message In your code you manipulate the class, but what you want is to manipulate the instance. Please change your code to: p = Page() p.message += world print p.message q = Page() print q.message Bye, Waldemar Kornewald --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] How to I use xml.sax in google app engine??
Hi list, I'm just playing with the google app engine. But can't seem to get the xml.sax to work :-( This is my code to read the xml: def returnTasks(xmldata): handler = TaskHandler() xml.sax.parseString(xmldata,handler) return handler.tasks I read the xmldata from a url with googles url fetch. It works from command line. But when I run it in the app engine, i get a: AttributeError: 'module' object has no attribute 'unlink' Why is this?? .Marc --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] download torrents search form goole
http://gpirate.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: one-to-many (ReferenceProperty) and memory
From what I understang, GAE always 'SELECT *', there is no way we could specify what property to select. If it is true you got memory error that quickly, then either you have tons of properties or there is a problem with GAE. Anyone else experiencing memory error that quick? On Sep 11, 10:04 am, GAEfan [EMAIL PROTECTED] wrote: One major limitation of AppEngine is that you can only query the datastore with a 'SELECT * FROM myData' meaning you must put ALL properties of each entity into memory. This gets you to a Memory error rather quickly, especially if you have many properties for each entity. In my app, I can only query about 100 entities at a time, nowhere near the expected 1000. I am trying to hack a form of 'SELECT PropertyOne FROM myData', to just put that single property into memory (of course through a broad range of many entities) I was wondering if I could save memory by using a one-to-many format, with ReferenceProperty. For example, my entities are keyed by date, so I thought of trying something like this: class myDate(BaseModel): Date = db.DateProperty() class PropertyOne(BaseModel): Date = db.ReferenceProperty(myDate, collection_name='prop1_ref') Value = db.FloatProperty() ... etc. for each Property, each Ref'd to myDate. My first question is: If I call ''SELECT * FROM myDate'', will it put all of the Referenced Properties into memory? If so, that may kill this idea, too. Second, would this act like a way to query ONLY an individual property, along with its Date? Something like ''SELECT * FROM PropertyOne'' ? (using this method, there seems to be no reason to reference the Property to myDate, just make several distinct Models. But it would be great to tie them all to a single date when I pull multiple properties.) Thirdly, is there some other method of querying just a single property, like myDate.PropertyOne, through a broad range of Dates, without having to get all of the other properties crowding into memory? Hope that makes sense. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Google Maps and Google App Engine
Please forgive me if this is answered elsewhere but searching did not find an answer! I'm building a webapp using Google App Engine and Google Maps. My question is: How do I use google maps with the google app engine desktop development environment (the App Engine SDK)? The issue is that the GAE SDK works on my laptop. But the google maps api uses a key bound to a domain. So I don't see how I can have a key bound to my localhost. And worse, when I upload my GAE webapp, my webapp will need a different key, right .. the one for the GAE domain? So I don't get it .. how can GAE and google maps interoperate? Seems like it will be very awkward. -- Owen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: How do I handle forms with django?
This is sort of unrelated, but if you take a look at some of the sample apps out there (rietveld, gae-django-guestbook) they seem to place the Forms into the views code. You could avoid the import problem by doing this. To address your problem in particular, do you have an __init.py__ inside your root level myapp directory? If you don't python won't be able to import from within it. On Sep 10, 1:46 pm, Peter [EMAIL PROTECTED] wrote: Hi folks, I'm trying to post some data from a form and then do something with it. But I'm hitting issues. I'm using the django version that comes with appengine. My models.py has from django import forms class MessageForm(forms.Form): message = forms.TextField() and my views.py has from myapp.models import MessageForm This causes the app to crash with the error message Exception Type: ViewDoesNotExist Exception Value: Tried message in module myapp.views. Error was: 'module' object has no attribute 'Form' Any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---