I am still new to Python and GAE. I have an application on a local server that is working fine. I can add an entity to my data warehouse, I can browse my site, etc .: Everything is in order.
Now I'm trying to use bulkloader to add objects to my data warehouse. I completed the tutorial at https://developers.google.com/appengine/docs/python/tools/uploadingdata . My bootloader is below:
from google.appengine.ext import ndb from google.appengine.tools import bulkloader import my_model class ArticleLoader(bulkloader.Loader): def __init__(self): bulkloader.Loader.__init__(self, 'Article', [('title', str), ('author', str) ]) loaders = [ArticleLoader]
I get an error message:
No module named my_model
Does anyone have a fix?
Note. I use only one directory. Thus, my bootloader is in the same place as another file that the module imports my_model.
my_model
, PYTHONPATH . Linux, Bulkloader:
PYTHONPATH
export PYTHONPATH=$PYTHONPATH:.
ββ PYTHONPATH my_model . , , script, , bulkload.
Windows, , sys.path.append. , script ( , Linux):
sys.path.append
import sys # ... sys.path.append('.')
my_model.py. , my_module. , Python module package docs.
my_model.py
my_module