#6 XML Files Aren't Rebuilding Properly

open
nobody
Caching (3)
5
2003-10-28
2003-10-28
Anonymous
No

This is what I've been getting recently:

Build error in template 'Last 10': Error in <MTEntries>
tag: Error in <MTAmazon> tag: Error reading XML
content: syntax error at line 1, column 49, byte 49 at
/usr/lib/perl5/XML/Parser.pm line 185 .

Here's the template:

<!-- BEGIN music -->
<div id="music-panel" class="content">
<h2>Grooves</h2>
<ul><$MTInclude module="Regex"$>
<MTEntries lastn="10">
<MTAmazon method="Asin" search="[MTEntryKeywords]"
line="books" lastn="1">
<li><a href="<MTAmazonLink
encode_ampersands="1">"><$MTEntryTitle
encode_ampersands="1" regex="1" smarty_pants="1"$></a></li>
</MTAmazon>
</MTEntries></ul>
</div>
<!-- END music -->

Does this have anything to do with Amazon's new full
text searching? Or is my install just corrupted?

Discussion

  • Will Willis

    Will Willis - 2003-12-12

    Logged In: YES
    user_id=429573

    I am getting the same problem:

    <br>
    Build error in template 'Test': Error in <MTAmazon> tag: Error
    reading XML content: syntax error at line 1, column 49, byte
    49 at /usr/local/lib/perl5/site_perl/5.8.0/i386-
    freebsd/XML/Parser.pm line 185 .
    <br>
    -silent11

     
  • Stepan Riha

    Stepan Riha - 2004-09-14

    Logged In: YES
    user_id=731697

    The problem is that Amazon returns a 503 response if you
    make more than one request per second to their AWS.
    MTAmazon saves the respons document (see bellow) as if it
    were an XML file and then chokes when it tries to parse it.
    It's easy to test by empying your cache directory and doing
    a full rebuild.

    MTAmazon should be fixed to do a couple of things:

    1) AmazongetRemoteXML() should check the reply status and
    only save the XML if it received a successfuly reply.
    2) It should keep track of the time it last called AWS and
    sleep until a second has elapsed, if neccessary.

    Here is the document that gets saved when Amazon returns a
    503 reply:

    <html>
    <head>
    <title>
    We're sorry!
    </title>

    <style type="text/css"><!--
    .serif { font-family: times,serif; font-size: small; }
    .sans { font-family: verdana,arial,helvetica,sans-serif;
    font-size: small; }
    .small { font-family: verdana,arial,helvetica,sans-serif;
    font-size: x-small; }
    .h1 { font-family: verdana,arial,helvetica,sans-serif;
    color: #CC6600; font-size: small; }
    .h3color { font-family: verdana,arial,helvetica,sans-serif;
    color: #CC6600; font-size: x-small; }
    .tiny { font-family: verdana,arial,helvetica,sans-serif;
    font-size: xx-small; }
    .listprice { font-family:
    arial,verdana,helvetica,sans-serif; text-decoration:
    line-through; font-size: x-small; }
    .price { font-family: verdana,arial,helvetica,sans-serif;
    color: #990000; font-size: x-small; }
    --></style>
    </head>

    <body bgcolor="#FFFFFF" link="#003399" alink="#FF9933"
    vlink="#996633" text="#000000">

    <center>
    <p>

    <table cellpadding=3 width="90%" bgcolor=#ffffff border=0
    cellspacing="2" align="center">
    <tr>
    <td>
    <h2>503 - Service Unavailable</h2>
    <p>
    You are receiving this error because you sent more than one
    request per second to Amazon Web Services (AWS). Per the
    AWS Licensing Agreement, AWS restricts each IP address to no
    more than one request per second. Please see the full
    <a
    href="http://www.amazon.com/gp/browse.html?node=3440661">AWS
    Licensing Agreement</a>.
    </td>
    </tr>
    </table>

    </body>
    </html>

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks