[ZCM] [ZC] 2051/ 3 Comment "xml import export fail"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Mon Mar 20 20:07:44 EST 2006


Issue #2051 Update (Comment) "xml import export fail"
 Status Pending, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/2051

==============================================================
= Comment - Entry #3 by allison on Mar 20, 2006 8:07 pm


Export-Import-Failure

<dtml-var standard_html_header>
A trivial dtml-method as an example<br>
<dtml-var standard_html_footer>

Export as XML to Server

<?xml version="1.0"?>
<ZopeData>
  <record id="88531" aka="AAAAAAABWdM=">
    <pickle>
      <tuple>
          <global name="DTMLMethod" module="OFS.DTMLMethod"/>
          <tuple/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string encoding="repr">_vars</string> </key>
            <value>
              <dictionary/>
            </value>
        </item>
        <item>
            <key> <string encoding="repr">title</string> </key>
            <value> <string encoding="repr"></string> </value>
        </item>
        <item>
            <key> <string encoding="repr">raw</string> </key>
            <value> <string encoding="cdata"><![CDATA[

<dtml-var standard_html_header>\n
A trivial dtml-method as an example<br>\n
<dtml-var standard_html_footer>

]]></string> </value>
        </item>
        <item>
            <key> <string encoding="repr">globals</string> </key>
            <value>
              <dictionary/>
            </value>
        </item>
        <item>
            <key> <string encoding="repr">__name__</string> </key>
            <value> <string encoding="repr">Export-Import-Failure</string>
</value>
        </item>
        <item>
            <key> <string encoding="repr">__ac_local_roles__</string>
</key>
            <value>
              <dictionary>
                <item>
                    <key> <string encoding="repr">allison</string> </key>
                    <value>
                      <list>
                          <string encoding="repr">Owner</string>
                      </list>
                    </value>
                </item>
              </dictionary>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>

and move to the input directory of the Zope instance.

Delete the original.
Import the XML

And, voila, the error appears --

Site Error

An error was encountered while publishing this resource.

Error Type: UnicodeDecodeError
Error Value: 'ascii' codec can't decode byte 0xd3 in position 7: ordinal
not in range(128)

Troubleshooting Suggestions

    * The URL may be incorrect.
    * The parameters passed to this resource may be incorrect.
    * A resource that this resource relies on may be encountering an
error.

For more detailed information about the error, please refer to the HTML
source for this page.

If the error persists please contact the site maintainer. Thank you for
your patience.


________________________________________
= Comment - Entry #2 by camil7 on Mar 20, 2006 5:31 pm

Any chance to get the XML file in question, or some
small sample whcih reproduces the issue?

Can the problem be reproduced by importing the file to the same
zope instance (e.g. after renaming the original object)?
________________________________________
= Request - Entry #1 by allison on Mar 19, 2006 7:31 pm

Two Zope instances.  Export one file from the first Zope instance (a DTML method) to Desktop, then ftp the file to the import folder of second Zope instance and attempted to import.  The result was the folling error:

Time  	2006/03/19 16:21:35.335 US/Pacific
User Name (User Id) 	allison (allison)
Request URL 	http://devtoo.agilemind.com/draPlay/manage_importObject
Exception Type 	UnicodeDecodeError
Exception Value 	'ascii' codec can't decode byte 0xa4 in position 25: ordinal not in range(128)

Traceback (innermost last):

    * Module ZPublisher.Publish, line 113, in publish
    * Module ZPublisher.mapply, line 88, in mapply
    * Module ZPublisher.Publish, line 40, in call_object
    * Module OFS.ObjectManager, line 585, in manage_importObject
    * Module OFS.ObjectManager, line 602, in _importObjectFromFile
    * Module ZODB.ExportImport, line 65, in importFile
    * Module OFS.XMLExportImport, line 114, in importXML
    * Module Shared.DC.xml.xyap, line 58, in unknown_endtag
    * Module OFS.XMLExportImport, line 93, in save_record

UnicodeDecodeError: 'ascii' codec can't decode byte 0xa4 in position 25: ordinal not in range(128)


==============================================================



More information about the Zope-Collector-Monitor mailing list