Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google App Engine Remote Api Import Error

I connected to my app using remote_api. When I try to import my models using this

from models import SimpleCounterShard

I get the following error

ImportError: No module named models

I tried searching for solutions and it seems something to do with PYTHONPATH. Can someone tell me how to fix this ? I am using a Mac.

like image 597
Sam Avatar asked Feb 25 '23 21:02

Sam


2 Answers

I added the application directory to my system path and it worked

like image 92
Sam Avatar answered Feb 27 '23 12:02

Sam


Connecting to remote_api provides you with access to your production data, but not to your python modules. Your source code must be available on your local machine to achieve what you're trying to do.

like image 38
YKS Avatar answered Feb 27 '23 13:02

YKS