Pyramid with GAE error

228 views
Skip to first unread message

Alejandro Jatib

unread,
Sep 15, 2012, 11:43:41 PM9/15/12
to pylons-...@googlegroups.com
Hi guys,
I'm making a new project with pyramid_appengine (I have a few other and these are working fine) and when i try to "buildout" a skeleton empty project i have this error:

.....
rod.recipe.appengine: Google App Engine distribution already downloaded.
While:
  Installing mascotanube.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/zc.buildout-1.6.3-py2.7.egg/zc/buildout/buildout.py", line 1852, in main
    getattr(buildout, command)(args)
  File "/Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/zc.buildout-1.6.3-py2.7.egg/zc/buildout/buildout.py", line 618, in install
    installed_files = self[part]._call(recipe.install)
  File "/Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/zc.buildout-1.6.3-py2.7.egg/zc/buildout/buildout.py", line 1327, in _call
    return f()
  File "/Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/rod.recipe.appengine-2.0.0-py2.7.egg/rod/recipe/appengine/__init__.py", line 327, in install
    self.copy_packages(ws, temp_dir)
  File "/Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/rod.recipe.appengine-2.0.0-py2.7.egg/rod/recipe/appengine/__init__.py", line 234, in copy_packages
    self.write_pkg_resources(ws, lib)
  File "/Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/rod.recipe.appengine-2.0.0-py2.7.egg/rod/recipe/appengine/__init__.py", line 217, in write_pkg_resources
    assert len(setuptools_eggs) == 1, "setuptools not found"
AssertionError: setuptools not found

Any suggestion?
I use virtualenv and I have setuptools installed in the same virtualenv.

Thanks!

Thomas G. Willis

unread,
Sep 16, 2012, 11:05:34 AM9/16/12
to pylons-...@googlegroups.com
As far as I know, buildout and virtualenv dont play well together. buildout and virtualenv do share some of the same goals such as isolating your development environment libraries from your system. there's no reason I can think of to use both. 

I would suggest trying to bootstrap the buildout with the system python2.7. like so


$ /usr/bin/python2.7 bootstrap.py --distribute && ./bin/buildout

If that doesn't work, file an issue @ https://github.com/Batterii/pyramid_appengine/issues and I'll see if I can help you out. 

Jacob Hite

unread,
Sep 25, 2012, 2:25:38 AM9/25/12
to pylons-...@googlegroups.com
I've encountered the same problem.

The pyramid docs here specifically document using virtualenv and
buildout together. Docs should probably be fixed...

http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/deployment/gae_buildout.html
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/pylons-discuss/-/vpBUKgzFSLkJ.
>
> To post to this group, send email to pylons-...@googlegroups.com.
> To unsubscribe from this group, send email to
> pylons-discus...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en.

Thomas G. Willis

unread,
Sep 26, 2012, 12:23:09 PM9/26/12
to pylons-...@googlegroups.com
I suppose the explanation for what you are doing(or should be) should
go here then to make it more obvious.

http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/deployment/gae_buildout.html#bootstrap-the-buildout

~/ $ cd newproject
~/newproject $ /usr/bin/python2.7 bootstrap.py --distribute

pyramid_appengine merely generates a buildout directory based on
templates, once the project is generated, it's does not have
pyramid_appengine as a dependency.

installing pyramid/associated libs like pyramid_appengine in a
virtualenv is generally good practice so that you avoid polluting your
system install of python

maybe it's a miss on the expected experience level of the reader. If I
documented why you should use buildout and why you should use
virtualenv and why appengine apps are structured the way they are it
would be very long documentation that would be quickly out of date
because it would have to be copied from other sources.

So I'm open to suggestions on how to make this bit clearer, but I'm
not too keen on documenting virtualenv, appengine apps and buildout.
especially since all 3 are in a state of flux at the moment.



Thomas G. Willis

Alejandro Jatib

unread,
Oct 2, 2012, 7:15:18 PM10/2/12
to pylons-...@googlegroups.com
Thanks Thomas.
I solve this issue deleting all files and creating a brand new virtualenv with a new installation of pyramid_appengine (a few week ago with pyramid 1.4 this not work, but with 1.3.4 yes)

I not understand deeply how buildout works but i can do "the salad" with buildout/appengine/pyramid and works fine!

Alejandro

Jacob Hite

unread,
Oct 4, 2012, 10:56:38 PM10/4/12
to pylons-...@googlegroups.com
Thanks Alejandro for the tip. Indeed things work well with pyramid
1.3. Not so well with 1.4.
> https://groups.google.com/d/msg/pylons-discuss/-/vCVTUotsz_gJ.

Jens W. Klein

unread,
Nov 5, 2012, 6:02:28 PM11/5/12
to pylons-...@googlegroups.com
On 2012-10-05 04:56, Jacob Hite wrote:
> Thanks Alejandro for the tip. Indeed things work well with pyramid
> 1.3. Not so well with 1.4.

I run in similar problems with 1.4 and tried to fix them. Even if not
tested in-depth, here are my working results.

https://github.com/jensens/pyramid-gae-tutorial

comments and further help is welcome.

hth anyone
Jens
Klein & Partner KG, member of BlueDynamics Alliance

Reply all
Reply to author
Forward
0 new messages