Search code examples
google-app-enginepyramidbuildout

"_run_file" Error with pyramid buildout for Google App Engine in Ubuntu


I built a new project using buildout for Pyramid and GAE under Ubuntu 12.04 (using pyramid_appenegine pcreate template). I started a new VM to ensure no messing with distribute and setuptools in site-packages.

First of all, it results in that setuptools not found error, apparently solved with the patch provided by Tom Willis.

Then, buildout finishes building ok, but starting the develop site results in that error:

funky@funkydesktop:~/dev/gae1$ bin/devappserver parts/gae1
Traceback (most recent call last):
  File "bin/devappserver", line 25, in <module>
    sys.exit(dev_appserver._run_file('/home/funky/dev/gae1/parts/google_appengine/dev_appserver.py', locals()))
AttributeError: 'module' object has no attribute '_run_file'

Any hints to solve that one, or the whole process of building and starting the application?


Solution

  • I finally solved the problem by changing ae-sdk-version to 1.8.0.

    Open buildout.cfg and change the line

    ae-sdk-version=1.7.5
    

    to:

    ae-sdk-version=1.8.0
    

    Or either you could see what happens with pyramid_appengine version (I got 0.8.1 instead of 0.8.2-a2 which is the current one in pypi.python.org). This is the package that holds the template.