im not able to import bookks from amazon

as soon as i press on the book it says translator issue
  • sample URL? - make sure it's not from a Kindle page.
    Also, make sure translators are working in general (e.g. NYTs).
  • im completely new to zotero, and really excited
    but- nyt and translators mean nothing to me
    can you please explain
  • http://www.amazon.com/Skills-Helping-Individuals-Families-Communities/dp/0495506087/ref=sr_1_1?ie=UTF8&s=books&qid=1276125198&sr=8-1
  • how do i enter general?
  • Okay, there does seem to be something wrong with the amazon translator.

    There was a report earlier today
    http://forums.zotero.org/discussion/13003/using-zotero-with-amazon/
    of it not working with
    http://www.amazon.com/Approaches-Cambridge-Studies-International-Relations/dp/0521466512/ref=sr_1_1?ie=UTF8&s=books&qid=1276101391&sr=1-1
    which seems to work for me on some page loads and not others.

    And the ym81tlv's sample does not seem to work for me at all.
  • NYT is the New York Times
    a translator is what lets you read data from a site into Zotero.

    The amazon book you link to doesn't work for me - here's the error if someone else wants to look at the translator:
    [JavaScript Error: "TypeError: texts[1] is undefined" {file: "file:///home/sebastian/.mozilla/firefox/wkxw8okh.default/zotero/translators/Amazon.com.js" line: 0}]

    Try this one:
    http://www.amazon.com/Blame-Welfare-Ignore-Poverty-Inequality/dp/0521690455/
  • edited June 9, 2010
    Looking at debug output, it looks like there's a real issue to address:

    (3)(+0000046):
    HTTP GET http://ecs.amazonaws.com/onca/xml?AWSAccessKeyId=AKIAIPYIWJ24AGZJ64AA&ItemId=
    0521466512&Operation=ItemLookup&ResponseGroup=ItemAttributes&Service=AWSECommerceService&Timestamp=2010-06-09T23%3A30%3A32Z&Version=2006-06-28&Signature=COWGRzLvswT4ETBezOR3xToLhRpfE1ASwIWCaZvOOpI%3D

    (2)(+0000152): Translate: Translation using Amazon.com failed:
    message => texts[1] is undefined
    fileName => chrome://zotero/content/xpcom/translate.js
    lineNumber => 943
    stack => ("\n<ItemLookupErrorResponse xmlns=\"http://ecs.amazonaws.com/doc/2006-06-28/\">
    <Error>
    <Code>SignatureDoesNotMatch</Code>
    <Message>The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.</Message>
    </Error>
    <RequestID>a9711888-bb4a-4c2a-8831-81adc533344b</RequestID></ItemLookupErrorResponse>",
    [object XMLHttpRequest],"http://ecs.amazonaws.com/onca/xml?AWSAccessKeyId=AKIAIPYIWJ24AGZJ64AA&ItemId=\n 0521466512&Operation=ItemLookup&ResponseGroup=ItemAttributes&Service=AWSECommerceService&Timestamp=2010-06-09T23%3A30%3A32Z&Version=2006-06-28&Signature=COWGRzLvswT4ETBezOR3xToLhRpfE1ASwIWCaZvOOpI%3D")@chrome://zotero/content/xpcom/translate.js:943

    Looks like Zotero needs to check its AWS access settings.
  • does that mean i cant import any book from amazon?
    ive checket for translator and its up to date
    does any one know if a parental (net nanny) problematic with zotero?
  • The problem is not on your end. We don't know yet what exactly is causing this, but the Amazon translator is a high priority one. Try using library catalogs, like the Library of Congress, if you urgently need to save books.

    Other sources usually have high quality data than Amazon in any case.
  • does any one know if a parental (net nanny) problematic with zotero?
  • adamsmith's URL works for me, so there may be something more subtle going on here.
  • My tentative guess is that something is indeed wrong with the AWS signatures, as the error message indicates, but that the problem is only on some of Amazon's servers -- either it's a glitch or it hasn't yet propagated to all of them.
  • edited June 9, 2010
    does any one know if a parental (net nanny) problematic with zotero?
    Not generally, and that's not the problem here.
  • It looks like the AWSAccessKeyId is the same for working and non-working requests.

    It seems to work if you trim the whitespace from asin before it is placed in params. Anyone care to confirm?
  • what does that mean?
  • ym81tlv: We're talking to each other. You don't need to post again until we ask for confirmation that something is fixed.
  • edited June 9, 2010
    fcheslack wins the prize.

    Trimming the whitespace works for me -- I've uploaded a fixed translator that works for me. If you see this problem, go to http://github.com/ajlyon/zotero-bits/raw/master/Amazon.com.js and save the file to the translators directory of your Zotero data directory (http://www.zotero.org/support/zotero_data).

    Post here if it works.

    @ym81tlv: Try downloading and installing the fixed translator from the link above.
  • edited June 9, 2010
    nope, sorry, doesn't work for me yet.
    And yes, I have restarted Firefox and I have used diff to check that the amazon translator in my data directory is in fact ajlyons version.

    Edit: I also still get the failed key authorization in the debug.
  • edited June 9, 2010
    No prizes yet, I suppose. It now works for me, so I don't have any more debug output to diagnose. adamsmith-- can you post broken URLs and the relevant pieces of debug output?

    edit: Hmm. I'm at a loss again.
  • Can you post the debug output anyway? Is there still a newline in the request?
  • you didn't trim the asin when there is only one (I think thats what that part is)
    var params = "AWSAccessKeyId=AKIAIPYIWJ24AGZJ64AA&ItemId=" + asin +
  • ajlyon - see below.


    4)(+0002185): Translate: Parsing code for Amazon.com

    (3)(+0000019): HTTP GET http://ecs.amazonaws.com/onca/xml?AWSAccessKeyId=AKIAIPYIWJ24AGZJ64AA&ItemId=
    0495506087&Operation=ItemLookup&ResponseGroup=ItemAttributes&Service=AWSECommerceService&Timestamp=2010-06-10T00%3A22%3A16Z&Version=2006-06-28&Signature=VsK%2Fgrh1jhwY9TAuNBtX0RK0mIi2jcLpUYpg220Y3lE%3D

    (2)(+0000115): Translate: Translation using Amazon.com failed:
    message => texts[1] is undefined
    fileName => chrome://zotero/content/xpcom/translate.js
    lineNumber => 943
    stack => ("\n<ItemLookupErrorResponse xmlns=\"http://ecs.amazonaws.com/doc/2006-06-28/\"><Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.</Message></Error><RequestID>8b759dbc-e65f-4d39-a153-61904a17feab</RequestID></ItemLookupErrorResponse>",[object XMLHttpRequest],"http://ecs.amazonaws.com/onca/xml?AWSAccessKeyId=AKIAIPYIWJ24AGZJ64AA&ItemId=\n 0495506087&Operation=ItemLookup&ResponseGroup=ItemAttributes&Service=AWSECommerceService&Timestamp=2010-06-10T00%3A22%3A16Z&Version=2006-06-28&Signature=VsK%2Fgrh1jhwY9TAuNBtX0RK0mIi2jcLpUYpg220Y3lE%3D")@chrome://zotero/content/xpcom/translate.js:943

    name => TypeError
    url => http://www.amazon.com/Skills-Helping-Individuals-Families-Communities/dp/0495506087/ref=sr_1_1?ie=UTF8&s=books&qid=1276125198&sr=8-1
    downloadAssociatedFiles => true
    automaticSnapshots => true
  • Ah. I was hurrying, and I don't know the Amazon translator very well. Try downloading and installing again from the link above; I've updated it per fcheslack's comment.
  • Shulman, Lawrence. 2008. The Skills of Helping Individuals, Families, Groups, and Communities. 6th ed. Brooks Cole.

    :-) good job.
  • I think that this probably is a sufficient patch; Amazon just tightened up its input verification for AWS and exposed our translator's weaknesses.

    If we can get another confirmation that this works from another user, I'll commit the changes to SVN and maybe this can be pushed out quickly.
  • In hopes of getting this pushed before Dan retires for the night, I committed the updated translator to SVN: https://www.zotero.org/trac/changeset/6114
  • Pushed. Thanks to everyone for the quick work.
  • ym81tlv and others: Your copy of Zotero should auto-update within 24 hours, or you can update manually by clicking Update Now in the General pane of the Zotero prefs.
Sign In or Register to comment.