Note that there are some explanatory texts on larger screens.

plurals
  1. POMarkers not showing on Google Map in Google App Engine
    primarykey
    data
    text
    <p>I have created a Google App Engine project in Python it runs on my localhost but when I upload it onto geo-event-maps.appspot.com the markers are not displaying. I have a cron which runs to call on /place. I have no log errors My datastore is empty! The txt files are being uploaded with:</p> <pre><code> file_path = os.path.dirname(__file__) path = os.path.join(file_path, 'storing', 'txtFiles') </code></pre> <p>Is there a way of checking the files have been uploaded?!</p> <p>I am at an absolute loss. Has anyone had these problems before?</p> <p>Below is my main.py:</p> <pre><code> ''' Created on Mar 30, 2011 @author: kimmasterson ''' #!/usr/bin/env python from google.appengine.ext import webapp from google.appengine.ext import db from placemaker import placemaker import logging import wsgiref.handlers import os, glob from google.appengine.dist import use_library use_library('django', '1.2') from google.appengine.ext.webapp import template class Story(db.Model): id = db.StringProperty() loc_name = db.StringProperty() title = db.StringProperty() long = db.FloatProperty() lat = db.FloatProperty() link = db.StringProperty() date = db.StringProperty() class MyStories(webapp.RequestHandler): def get(self): temp = db.Query(Story) temp = temp.count() story_set = Story.all() template_values = { 'storyTemp': story_set } path = os.path.join(os.path.dirname(__file__), 'index.html') self.response.out.write(template.render(path, template_values)) class place(webapp.RequestHandler): def get(self): #path = '/storing/txtFiles' file_path = os.path.dirname(__file__) path = os.path.join(file_path, 'storing', 'txtFiles') try: for infile in glob.glob(os.path.join(path, '*.txt')): #print infile f = open(infile, 'r') data = f.read() newfile = infile.replace('.txt', '') newfile = newfile.replace('/storing/txtFiles/', '') #print newfile storyname = 'http://www.independent.ie/national-news/' + newfile #print storyname #print newfile #logging.info(data) p = placemaker('HSnG9pPV34EUBcexz.tDYuSrZ8Hnp.LowswI7TxreF8sXrdpVyVIKB4uPGXBYOA9VjjF1Ca42ipd_KhdJsKYjI5cXRo0eJM-') print p.find_places(data) for place in p.places: splitted = place.name.split() for word in splitted: temp = db.Query(Story) temp = temp.filter("link = ", storyname) results = temp.fetch(limit=1) if len(results) &gt; 0: break elif 'IE' in word: print temp print 'success' print 'name of the file is:' + newfile story = Story(name=newfile, long=place.centroid.longitude, lat=place.centroid.latitude, link=storyname, loc_name=place.name, title=newfile).put() #logging.info(type(place.centroid.latitude)) except: print 'error' def main(): application = webapp.WSGIApplication([('/', MyStories), ('/place', place)], debug=True) wsgiref.handlers.CGIHandler().run(application) if __name__ == '__main__': main() </code></pre> <p>Here is my cron.yaml</p> <pre><code> cron: - description: running place url: /place schedule: every day 11:05 </code></pre> <p>App.yaml is as follows:</p> <pre><code>application: geo-event-maps version: 2 runtime: python api_version: 1 handlers: - url: .* script: main.py builtins: - datastore_admin: on </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload