>From time to time I get the following error:

exceptions.TypeError at *url*
__nonzero__ should return an int

which occurs at the "if c:" statement:

def get_id_from_url(url):
    id = False
    c = web.select(
        'state_license.all_companies_url',
        vars  = dict(url=url),
        what  = 'company_id as id',
        where = 'url = $url')
    if c:
        id = c[0].id
    return id

local vars are:

c: <web.utils.IterBetter instance at 0x2aaaaaf0f680>
id: False
url: *url*

Did anyone notice the same errors? It just happens sometimes,
especially when a bot crawls my site. I'm using web 0.23.

Thank you.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to