Will attempting to import a zexp file (and exported plone site) I get the following error: 2006-01-11T09:44:03 ERROR(200) SiteError http://127.0.0.1:8180/do2/manage_importObject Traceback (most recent call last): File "/home/webenv/zope/lib/python/ZPublisher/Publish.py", line 101, in publish request, bind=1) File "/home/webenv/zope/lib/python/ZPublisher/mapply.py", line 88, in mapply if debug is not None: return debug(object,args,context) File "/home/webenv/zope/lib/python/ZPublisher/Publish.py", line 39, in call_object result=apply(object,args) # Type s<cr> to step into published object. File "/home/webenv/zope/lib/python/OFS/ObjectManager.py", line 532, in manage_importObject raise BadRequest, 'Invalid file name %s' % escape(file) BadRequest: Invalid file name InfoTechnical.zexp Either I'm missing something very simple, or something is very wrong. Any idea what the problem might be? -- David Bear What's the difference between private knowledge and public knowledge?
David Bear wrote:
Will attempting to import a zexp file (and exported plone site) I get the following error:
result=apply(object,args) # Type s<cr> to step into published object. File "/home/webenv/zope/lib/python/OFS/ObjectManager.py", line 532, in manage_importObject raise BadRequest, 'Invalid file name %s' % escape(file) BadRequest: Invalid file name InfoTechnical.zexp
Acording to ObjectManager source this exception is raised because you're suplying a path with a directory component (some/dir/InfoTechnical.zexp) def manage_importObject(self, file, REQUEST=None, set_owner=1): """Import an object from a file""" dirname, file=os.path.split(file) if dirname: raise BadRequestException, 'Invalid file name %s' % escape(file) HTH -- //// (@ @) ----------------------------oOO----(_)----OOo-------------------------- <> Ojo por ojo y el mundo acabara ciego /\ Alexis Roda - Universitat Rovira i Virgili - Reus, Tarragona (Spain) -----------------------------------------------------------------------
thanks for the info. I went and actually read the help text on the import/export screen where it states: ========== You may import Zope objects which have been previously exported to a file, by placing the file in the "import" directory of your Zope installation on the server. You should create the "import" directory in the root of your Zope installation if it does not yet exist. Note that by default, you will become the owner of the objects that you are importing. If you wish the imported objects to retain their existing ownership information, select "retain existing ownership information". =========== does this mean I create a directory named 'import' at the instance home? (what is the 'root' of my zope installation?) On 1/11/06, SER.RI-TIC-Alexis Roda <alexis.roda@urv.net> wrote:
David Bear wrote:
Will attempting to import a zexp file (and exported plone site) I get the following error:
result=apply(object,args) # Type s<cr> to step into published object. File "/home/webenv/zope/lib/python/OFS/ObjectManager.py", line 532, in manage_importObject raise BadRequest, 'Invalid file name %s' % escape(file) BadRequest: Invalid file name InfoTechnical.zexp
Acording to ObjectManager source this exception is raised because you're suplying a path with a directory component (some/dir/InfoTechnical.zexp)
def manage_importObject(self, file, REQUEST=None, set_owner=1): """Import an object from a file""" dirname, file=os.path.split(file) if dirname: raise BadRequestException, 'Invalid file name %s' % escape(file)
HTH -- //// (@ @) ----------------------------oOO----(_)----OOo-------------------------- <> Ojo por ojo y el mundo acabara ciego /\ Alexis Roda - Universitat Rovira i Virgili - Reus, Tarragona (Spain) -----------------------------------------------------------------------
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- David Bear What's the difference between private knowledge and public knowledge?
On Wed, Jan 11, 2006 at 03:00:43PM -0700, David Bear wrote:
thanks for the info. I went and actually read the help text on the import/export screen where it states:
==========
You may import Zope objects which have been previously exported to a file, by placing the file in the "import" directory of your Zope installation on the server. You should create the "import" directory in the root of your Zope installation if it does not yet exist.
Note that by default, you will become the owner of the objects that you are importing. If you wish the imported objects to retain their existing ownership information, select "retain existing ownership information". ===========
does this mean I create a directory named 'import' at the instance home?
It should be there already, it's created by mkzopeinstance.py. -- Paul Winkler http://www.slinkp.com
participants (3)
-
David Bear -
Paul Winkler -
SER.RI-TIC-Alexis Roda