Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7622381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:26:15+00:00 2026-05-31T04:26:15+00:00

I have this code: _q = db.Query(SELECT * FROM Area WHERE suburb_town_lower == :1,

  • 0

I have this code:

_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

And I’m getting this result:

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 -

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T04:26:16+00:00Added an answer on May 31, 2026 at 4:26 am

    A couple of things look wrong to me:

    1. I don’t think you can use Query like that. It looks like you want to use a GqlQuery instead.
    2. In GQL, the equality operator is = (not ==). Here’s a link to the GQL syntax reference.

    For example:

    _q = db.GqlQuery("SELECT * FROM Area WHERE suburb_town_lower = :1", i.lower())
    

    I have tested that this kind of query works here: http://shell.appspot.com/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: chars = #some list try: indx = chars.index(chars) except ValueError:
I have this code: $resource=mysql_query(SELECT * FROM messages WHERE user='$id'); $num=mysql_num_rows($resource); if ($num==0) echo
I have this piece of code which i am using on another area of
I have this code for print a multi columns table from mysql $k=<table width='100%'
I have some code that is putting the resultset from a query into a
I have this code: $rows = array(); $res = mysql_query($someQuery); if(!mysql_errno()) while($row = mysql_fetch_assoc($res))
I have this code in jQuery, that I want to reimplement with the prototype
I have this code that performs an ajax call and loads the results into
I have this code #include <iostream> using namespace std; int main(int argc,char **argv) {
I have this code: CCalcArchive::CCalcArchive() : m_calcMap() { } m_calcMap is defined as this:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.