1
私はこのコードを持っている何の属性の種類」を持っていない:クエリの投げフェッチ 'str' はオブジェクトが
_q = db.Query("SELECT * FROM Area WHERE suburb_town_lower == :1", i.lower())
try:
_areas = _q.fetch(1000)
except AttributeError, e:
logging.info(e)
logging.info(dir(_q))
logging.info("Query: %s" % _q)
logging.info("Area: %s" % i)
logging.info("Area_: %s" % i.lower())
return
をそして、私はこの結果を取得しています:事前に
INFO 2012-03-04 16:54:38,489 dev_appserver.py:2884] "GET /import-data HTTP/1.1" 200 -
INFO 2012-03-04 16:54:38,758 dev_appserver.py:2884] "GET /favicon.ico HTTP/1.1" 200 -
INFO 2012-03-04 16:54:39,141 import_data.py:112] 'str' object has no attribute 'kind'
INFO 2012-03-04 16:54:39,142 import_data.py:113] ['_Query__ancestor', '_Query__filter_disjunction', '_Query__orderings', '_Query__query_sets', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__getitem__', '__getstate__', '__hash__', '__init__', '__iter__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_app', '_compile', '_cursor', '_end_cursor', '_get_query', '_keys_only', '_model_class', '_namespace', 'ancestor', 'count', 'cursor', 'fetch', 'filter', 'get', 'is_keys_only', 'order', 'run', 'with_cursor']
INFO 2012-03-04 16:54:39,142 import_data.py:114] Query: <google.appengine.ext.db.Query object at 0xdb2a44c>
INFO 2012-03-04 16:54:39,143 import_data.py:115] Area: Blacktown City Council LG
INFO 2012-03-04 16:54:39,143 import_data.py:116] Area_: blacktown city council lg
INFO 2012-03-04 16:54:39,150 dev_appserver.py:2884] "POST /import-data/task HTTP/1.1" 200 -
感謝を