В Втр, 29/11/2005 в 23:46 +0100, Stefano Schintu пишет: > Hi Ruslan, >
Hi Stefano. > > 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. > The same here, except that i use python 2.3.5 from sources for zope 2.8.4 > > 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 I tried the above steps and it works for me. With python2.4.2 too. zexp and xml export/import won't work as CPS has features that standard zope export/import facilities don't handle, that's why we have CPSIO and soon CMFSetup to handle export/import from/to CPS sites. P.S. Can you, please, provide me with voc.zip that you exported so that i'll be able to try it. Ruslan _______________________________________________ cps-users mailing list [email protected] http://lists.nuxeo.com/mailman/listinfo/cps-users
