Re: Problem with importing with transmogrifier

dieter <[email protected]>
Newsgroups gmane.comp.web.zope.plone.user
Message-ID <[email protected]>
Alberto Lopes <[email protected]> writes:

> I am trying to migrate some content from a Plone 4.0.7 site (running on
> Windows 2003) to a Plone 4.3.1 test install (running on a Windows 7
> machine).
>
> When I tried to import the tarball on the new site, here is the traceback I
> got:
>
>
> Traceback (innermost last):
> ...
>    - Module quintagroup.transmogrifier.reader, line 96, in readFiles
>    - Module Products.GenericSetup.context, line 355, in readDataFile
>
> AttributeError: 'NoneType' object has no attribute 'read'
>
>
> Checking the Products.GenericSetup.context code, on the readDataFile
> method, it has two parameters, filename and subdir.
>
> I debbuged to see what were the values for these parameters. It seems like
> quintagroup.transmogrifier.reader is calling that method passing not only
> the xml files contained in the tarball, but also the directories. The error
> happens because readDataFile tries to extract the "file", passing the
> directory name (line 347), and then tries to read it (line 352), but since
> extractfile returned None, there was no read method.

This sounds like a strange way to extract a file from a tar archive.
Does the information passed in for the xml files contain the pathnames
or only the final file name? In the first case, you could try
to extract the file via the filepath; in the second case, you could
combine the directory with the filename and try that. If either succeeds,
then your version on "quintagroup.transmogrifier" seems buggy and
yoz could try a different one.


------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.