Additional information, this seems to be isolated to .py files that are 
symlinks.

my project has multiple services and share common code via symlink.

project
-- common
---- models.py

-- web_service (standard app engine)
---- models.py (symlinked to ../common/models.py)

-- worker_service (flexible env app engine)
---- models.py (symlinked to ../common/models.py)

The models.py throws the "No module named models.py" if I don't compile 
before deploying.

On Tuesday, May 31, 2016 at 5:09:26 PM UTC-5, Brian Michelich wrote:
>
> Hello,
> I have a python flexible environment running for a service called worker. 
>  It's pretty simple, a process will parse a csv file and create model 
> entities.
>
> If I delete all the *.pyc files, the application fails to run with errors 
> saying the python files aren't found.  If I include the pyc files during 
> the deploy the application runs as expected.
>
> I would expect the python runtime in a flexible environment to compile and 
> run the *.py files as needed.  Is this incorrect?
>
> app.yaml:
>
> service: worker
> runtime: python-compat
> threadsafe: true
> vm: true
>
> handlers:
> - url: /worker/.*
>   script: routes.application
>
>
> Error if I don't include the pyc files:
>
> Failed to import routes.application Traceback (most recent call last): 
> File "/env/local/lib/python2.7/site-packages/vmruntime/wsgi_config.py", 
> line 55, in app_for_script app, unused_filename, err = 
> wsgi.LoadObject(script) File 
> "/env/local/lib/python2.7/site-packages/google/appengine/runtime/wsgi.py", 
> line 85, in LoadObject obj = __import__(path[0]) File 
> "/home/vmagent/app/routes.py", line 3, in <module> from env import 
> ON_SERVER ImportError: No module named env
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/ee40a880-f2cd-458b-a5c2-8e91f023ab1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to