在 ajax.py 中,我有这个 import 语句:
import components.db_init as db
在 components/db_init.py 中,我有这个导入语句:
# import locals from ORM (Storm)
from storm.locals import *
在 components/storm/locals.py 中,它有这个:
from storm.properties import Bool, Int, Float, RawStr, Chars, Unicode, Pickle
from storm.properties import List, Decimal, DateTime, Date, Time, Enum
from storm.properties import TimeDelta
from storm.references import Reference, ReferenceSet, Proxy
from storm.database import create_database
from storm.exceptions import StormError
from storm.store import Store, AutoReload
from storm.expr import Select, Insert, Update, Delete, Join, SQL
from storm.expr import Like, In, Asc, Desc, And, Or, Min, Max, Count, Not
from storm.info import ClassAlias
from storm.base import Storm
所以,当我在 ajax.py 中运行 import 语句时,我得到了这个错误:
<type 'exceptions.ImportError'>: No module named storm.properties
我可以毫无例外地运行 components/db_init.py ......所以我不知道发生了什么。
有人可以阐明这个问题吗?