Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7824049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:27:58+00:00 2026-06-02T08:27:58+00:00

So I was running the basic tutorial code for google app engine Datastore introduciton:

  • 0

So I was running the basic tutorial code for google app engine Datastore introduciton:

import cgi
import datetime
import urllib
import webapp2

from google.appengine.ext import db
from google.appengine.api import users


class Greeting(db.Model):
    """Models an individual Guestbook entry with an author, content, and date."""
    author = db.UserProperty()
    content = db.StringProperty(multiline=True)
    date = db.DateTimeProperty(auto_now_add=True)


def guestbook_key(guestbook_name=None):
    """Constructs a datastore key for a Guestbook entity with guestbook_name."""
    return db.Key.from_path('Guestbook', guestbook_name or 'default_guestbook')


class MainPage(webapp2.RequestHandler):
    def get(self):
        self.response.out.write('<html><body>')
        guestbook_name=self.request.get('guestbook_name')

        # Ancestor Queries, as shown here, are strongly consistent with the High
        # Replication datastore. Queries that span entity groups are eventually
        # consistent. If we omitted the ancestor from this query there would be a
        # slight chance that Greeting that had just been written would not show up
        # in a query.
        greetings = db.GqlQuery("SELECT * "
                                "FROM Greeting "
                                "WHERE ANCESTOR IS :1 "
                                "ORDER BY date DESC LIMIT 10",
            guestbook_key(guestbook_name))

        for greeting in greetings:
            if greeting.author:
                self.response.out.write(
                    '<b>%s</b> wrote:' % greeting.author.nickname())
            else:
                self.response.out.write('An anonymous person wrote:')
            self.response.out.write('<blockquote>%s</blockquote>' %
                                    cgi.escape(greeting.content))

        self.response.out.write("""
          <form action="/sign?%s" method="post">
            <div><textarea name="content" rows="3" cols="60"></textarea></div>
            <div><input type="submit" value="Sign Guestbook"></div>
          </form>
          <hr>
          <form>Guestbook name: <input value="%s" name="guestbook_name">
          <input type="submit" value="switch"></form>
        </body>
      </html>""" % (urllib.urlencode({'guestbook_name': guestbook_name}),
                    cgi.escape(guestbook_name)))


class Guestbook(webapp2.RequestHandler):
    def post(self):
        # We set the same parent key on the 'Greeting' to ensure each greeting is in
        # the same entity group. Queries across the single entity group will be
        # consistent. However, the write rate to a single entity group should
        # be limited to ~1/second.
        guestbook_name = self.request.get('guestbook_name')
        greeting = Greeting(parent=guestbook_key(guestbook_name))

        if users.get_current_user():
            greeting.author = users.get_current_user()

        greeting.content = self.request.get('content')
        greeting.put()
        self.redirect('/?' + urllib.urlencode({'guestbook_name': guestbook_name}))


app = webapp2.WSGIApplication([('/', MainPage),
    ('/sign', Guestbook)],
    debug=True)

Within Pycharm I just press ‘shift+F10’ to run the above code.

I get the following logging before the site opens up at 127.0.0.1:8080:

C:\Python27\python.exe “C:/Program
Files/Google/google_appengine/dev_appserver.py” .

WARNING 2012-03-02 01:34:41,374 rdbms_mysqldb.py:74] The rdbms API is
not available because the MySQLdb library could not be loaded.

INFO 2012-03-02 01:34:41,976 appengine_rpc.py:160] Server:
appengine.google.com

INFO 2012-03-02 01:34:41,983 appcfg.py:581] Checking for updates
to the SDK.

INFO 2012-03-02 01:34:44,369 appcfg.py:599] The SDK is up to date.

WARNING 2012-03-02 01:34:44,371 datastore_file_stub.py:513] Could not
read datastore data from
c:\users\robert\appdata\local\temp\dev_appserver.datastore

INFO 2012-03-02 01:34:46,295 dev_appserver_multiprocess.py:650]
Running application dev~helloworld on port 8080: http://localhost:8080

INFO 2012-03-02 01:34:46,296 dev_appserver_multiprocess.py:652]
Admin console is available at: http://localhost:8080/_ah/admin

WARNING 2012-03-02 01:34:47,480 py_zipimport.py:139] Can’t open
zipfile C:\Python27\lib\site-packages\pyfacebook-1.0a2-py2.7.egg:
IOError: [Errno 13] file not accessible:
‘C:\Python27\lib\site-packages\pyfacebook-1.0a2-py2.7.egg’

INFO 2012-03-02 01:34:49,108 datastore_stub_index.py:257] Updating
C:\Users\Robert\PycharmProjects\helloworld\index.yaml

INFO 2012-03-02 01:34:49,148 dev_appserver.py:2865] “GET /
HTTP/1.1” 200 –

INFO 2012-03-02 01:34:49,315 dev_appserver.py:2865] “GET
/favicon.ico HTTP/1.1” 404 –

Note the log has the line:

WARNING 2012-03-02 01:34:47,480 py_zipimport.py:139] Can’t open zipfile C:\Python27\lib\site-packages\pyfacebook-1.0a2-py2.7.egg: IOError: [Errno 13] file not accessible: ‘C:\Python27\lib\site-packages\pyfacebook-1.0a2-py2.7.egg’

I’m sure there is a reasonable, logical explanation for this, anyone know?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T08:28:00+00:00Added an answer on June 2, 2026 at 8:28 am

    I don’t know for sure, but it “smells” like a path / installation conflict. Perhaps App Engine is finding the package in a spot where it can’t access it (in another python installation, perhaps?). If you can import the package from the interactive python shell, then the file has the right permissions; in that case, check for multiple installations / install paths. In my case, something was installed in the “system” python but not the one App Engine was using.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Used this http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html tutorial to understand the basic concepts, but having problems running my
I'm learning Android development. I have a basic app running on the Gingerbread emulator,
I have some very basic SignalR code running on the js client: var conn
I have a self-hosted WCF app using Basic HTTP Binding, no SSL, running in
I'm trying to learn about grails with Google App Engine and JPA by following
I'm trying to compile the basic tutorial program at http://doc.trolltech.com/4.4/mainwindows-application.html and running into a
I'm simply trying to run the basic openCV hello world tutorial code, but I'm
In running through the basic rails tutorial section about outputting comments, I get the
We need to create a basic PDF reader running on J2ME. While there are
I'm running my own (albeit, basic) benchmarks in a linux-based sandbox. However, I'd love

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.