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 9129461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:45:08+00:00 2026-06-17T07:45:08+00:00

Doing gql.query and not getting any results when I KNOW from looking at the

  • 0

Doing gql.query and not getting any results when I KNOW from looking at the datastore that there is a matching entry — anyone ? maybe it has to do with the format of my variables?

for each in leveloneAdd:
    new = tuple(each[1:-1].split(','))
    tag = new[0]
    htype = new[1]

    q1 = Level_1_Headings.all().filter("name1 =",tag).filter("heading_type =",htype).get()

So in my logs: have confirmed that values of variables are as follows:

INFO     2013-01-14 20:28:38,370 main.py:293] new is (u"'english'", u" 'subject'")
INFO     2013-01-14 20:28:38,370 main.py:295] tag is 'english'
INFO     2013-01-14 20:28:38,370 main.py:297] heading type is  'subject'

Also have confirmed that entry does exit (both name1 and heading_type are indexable)

  • 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-06-17T07:45:09+00:00Added an answer on June 17, 2026 at 7:45 am

    Looking at your tuple, you appear to have strings that contain quotes:

    (u"'english'", u" 'subject'")
    

    Therefore when you try to query them, you are querying 'english' instead of english, which I’m assuming you want. Try stripping out the quotes from your original string if possible to see if the result returns as expected. You can see the difference here:

    In [61]: t = (u"'english'", u"'subject'")
    
    In [62]: a, b = t
    
    In [63]: print a, b
    'english' 'subject'
    
    In [64]: t = (u"english", u"subject")
    
    In [65]: a, b = t
    
    In [66]: print a, b
    english subject
    

    To fix it, you could try something like this (note: you have a leading space in front of subject, so you may need to adjust for that):

    In [68]: a, b = [i.strip("'") for i in t]
    
    In [69]: a, b
    Out[69]: (u'english', u'subject')
    
    In [70]: print a, b
    english subject
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Doing a mysqli query and COUNTing the results, is there a preferred comparison operator
Doing a search using django-sphinx gives me results._sphinx that says there were 68 results,
Doing a simple query I'm finding two very different results, and I'm not sure
I am attempting to retrieve an entry from my datastore with this: query =
Don't know if it's I'm doing it wrong or if there's a bug (I
Doing a file upload to an aspx page from C#. Getting a: PathTooLongException The
Doing the getting started of Sinatra. I get this error: ./sinatra.rb:5: undefined method `get'
I want to build GQL query to get an object using its numeric id.
Doing the following on XP and Windows 7 yields different results in a .NET4
Doing some code reviews lately I came across a number of classes that have

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.