Skip to content

Error Handling #22

@redtoad

Description

@redtoad

Originally reported by Oliver Wilkie (Bitbucket: oliw, GitHub: oliw)


Hi,
I'm trying to use the api for my django-powered website.

The relevant code is attached here

#!python
from amazonproduct import API       
        api = API(AWS_KEY, SECRET_KEY, 'us')
        node = api.item_search('Music', Artist=artist, ResponseGroup='Images')
        try:
            total_pages = node.Items.TotalPages.pyval
        except NoExactMatchesFound:
            total_pages = 0

I am getting this error from django

Exception Type: TemplateSyntaxError
Exception Value:

Caught an exception while rendering: global name 'NoExactMatchesFound' is not defined

Any ideas?


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmajor

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions