-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imports fail on Google App Engine #5
Comments
Hello! In fact, I didn't test Plim on GAE at all, but it seems to work perfectly well with a regular CPython environment (both in 2.x and 3.x). Therefore, I need more information about the GAE environment. Is there a list of allowed/prohibited packages for GAE?
The initial version used absolute imports. But the 2to3 utility suggested me to rewrite them to relative ones. It works for me now both on 2.x and 3.x environment. So, could you provide your import traceback? I believe that the problem caused either by incorrect PYTHONPATH/sys.path or by another GAE restriction. |
I wouldn't be surprised if I had a peculiarity on my machine causing it to fail.
|
I'm running appengine installed on Archlinux from the AUR package google-appengine-python My code is using the python27 runtime and threading is enabled; I'll try and throw together a minimal error example later for you to try. |
Ok, keep me in touch |
Has this ever been addressed? Is plim still active? |
@mez it is active, but since I never used GAE and do not have plans for using Python on GAE, I need somebody else to address this issue. I can only guarantee that Plim works correctly in classic CPython environments - https://travis-ci.org/avanov/Plim/builds |
Thanks @avanov I managed to just download the .egg into the bundle. Any plans to create an adapter for webapp2 framework? Here is what I managed to gather from the internet and was able to get correct rendering output. from functools import partial lookup = TemplateLookup(directories=['/templates']) print Template(filename="templates/index.plim").render() Is there a better, easier way to use this engine? Sorry I am new to python in general so this is a learning step for me! -Mez |
You have used the correct way of initializing Mako Lookup. The only thing is that if you specify the parent directory via
Could you provide me a link on how templates work in this framework? I need to know if there's a way to integrate custom Mako Lookups. |
In particular the execjs library tries to import subprocess which I believe is a disallowed module on app engine.
Along with this the "from . import errors" line fails but "from plim.errors import *" seems to work
I have solved the problem for my own system by ripping out the extensions and using the wildcard import but this is not a real solution; I will look into fixing it more elegantly once my site is a MVP (unless it is already fixed by then)
The text was updated successfully, but these errors were encountered: