Hi Ruslan, > Which version of CPS do you use for export/import?
I've just tried with revision 300808 from the svn. I'm running Fedora 4 with python 2.4.2 and zope 2.8.4 both compiled from sources. > Currently you should be able to do that with CPSIO, as well as with > CMFSetup if you are using modern CPS(we are moving to use CMSetup > gradually). This is exactly what I did: 1) Create a new vocabulary called "test_voc" using http://localhost:8080/cps/vocabularies_manage_form 2) Added the following two entries to the vocabulary test1 Test 1 test1_string test2 Test 2 test2_string 3) Exported the vocabularies using http://localhost:8080/cps/cpsio_exporter_chooser selecting CPS3exporter as Export module 4) In the export form I inserted voc.zip as the directory name, checked only the checkbox Export vocabularies 5) The output was: Export successful Export will use dir /home/zope284-p242/var/voc Exporting to file /home/zope284-p242/var/voc/index Exporting vocabularies to file /home/zope284-p242/var/voc/vocabularies Export will use dir /home/zope284-p242/var/voc Exporting to file /home/zope284-p242/var/voc/index Exporting vocabularies to file /home/zope284-p242/var/voc/vocabularies 6) Deleted the test_voc vocabulary 7) Moved the voc.zip from var to import dir 8) Started the import procedure at http://localhost:8080/cps/cpsio_importer_chooser, selected CPS3Importer as Import module, then in the next form entered the voc.zip in the file name field and selected only the checkbox Import vocabularies 9) The output was: Request URL http://localhost:8080/cps/cps3importer Exception Type IndexError Exception Value list index out of range 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 Products.CMFCore.FSPythonScript, line 108, in __call__ * Module Shared.DC.Scripts.Bindings, line 311, in __call__ * Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec * Module Products.CMFCore.FSPythonScript, line 163, in _exec * Module None, line 17, in cps3importer <FSPythonScript at /cps/cps3importer> Line 17 * Module Products.CPSIO.import_modules.CPS3Importer, line 222, in importFile * Module Products.CPSIO.import_modules.CPS3Importer, line 938, in importFile * Module Products.CPSIO.import_modules.CPS3Importer, line 952, in updateVocabularies * Module Products.CPSIO.import_modules.CPS3Importer, line 1102, in verifyVocabularies * Module Products.CPSSchemas.VocabulariesTool, line 63, in manage_addCPSVocabulary * Module Products.CPSSchemas.Vocabulary, line 259, in __init__ * Module Products.CPSSchemas.Vocabulary, line 103, in __init__ IndexError: list index out of range Then I tried from the ZMI: 1) selected portal_vocabularies 2) checked the test_voc and clicked on the Import/Export button 3) entered the following: Export object ID: test_voc Export to: Save to file on server and clicked the export button and received a successfully feedback 4) Deleted test_voc from portal_vocabularies 5) Moved the test_voc.zexp from var to import dir 6) in portal_vocabularies clicked the Import/Export button and then choosed the test_voc.zexp from the dropdown and selected the radio button Retain existing ownership information 7) I was redirected to a Resource not found error, the url is http://localhost:8080/cps/portal_vocabularies/manage_importObject, and the page contained the following traceback: Error Type: NotFound Error Value: CPSVocabulary 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 561, in manage_importObject * Module OFS.ObjectManager, line 580, in _importObjectFromFile * Module OFS.CopySupport, line 377, in _verifyObjectPaste * Module OFS.Traversable, line 233, in restrictedTraverse * Module OFS.Traversable, line 213, in unrestrictedTraverse __traceback_info__: ([], 'CPSVocabulary') NotFound: CPSVocabulary I tried also to export and import the file in XML format instead of zexp and in this case I get the following error: Request URL http://localhost:8080/cps/portal_vocabularies/manage_importObject Exception Type BadPickleGet Exception Value 6 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 561, in manage_importObject * Module OFS.ObjectManager, line 578, in _importObjectFromFile * Module ZODB.ExportImport, line 65, in importFile * Module OFS.XMLExportImport, line 119, in importXML * Module ZODB.ExportImport, line 75, in importFile * Module transaction._transaction, line 297, in savepoint * Module transaction._transaction, line 294, in savepoint * Module transaction._transaction, line 657, in __init__ * Module ZODB.Connection, line 1034, in savepoint * Module ZODB.Connection, line 470, in _commit * Module ZODB.ExportImport, line 140, in _importDuringCommit BadPickleGet: 6 Thanks again, Stefano _______________________________________________ cps-users mailing list [email protected] http://lists.nuxeo.com/mailman/listinfo/cps-users
