ZTM import of xtm, AttributeError in App.Product
Hi all, I am diving into ZopeTopicMaps these days and make good progress. I can add TopicMaps and everything by hand to a CMFsite. When importing the xtm file via http://grooveway:9080/openspirit.de/cmftest/System/TopicMap/topicmap_edit_fo... i get the following error. Any hints about this module are appreciated. I don't know if you're familiar with ZTM and if you have to know which products are installed, i guess it's not so important for the first diagnosis, but in case it is , just let me know. I have everything including the PortalBTreeFolder, all current. Traceback (innermost last): Module ZPublisher.Publish, line 98, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Products.ztm2.TopicMap, line 55, in importTopicmap Module Products.ztm2.XTMUtil, line 319, in __init__ Module xml.parsers.xmlproc.xmlval, line 44, in feed Module xml.parsers.xmlproc.xmlutils, line 332, in feed Module xml.parsers.xmlproc.xmlproc, line 112, in do_parse Module xml.parsers.xmlproc.xmlproc, line 388, in parse_data Module xml.parsers.xmlproc.xmlval, line 240, in handle_data Module Products.ztm2.XTMUtil, line 285, in handle_data Module Products.ztm2.XTMUtil, line 149, in createTopic Module Products.CMFCore.PortalFolder, line 362, in invokeFactory Module Products.CMFCore.TypesTool, line 824, in constructContent Module Products.CMFCore.TypesTool, line 503, in constructInstance Module Products.CMFCore.TypesTool, line 451, in _getFactoryMethod Module App.FactoryDispatcher, line 26, in __getitem__ Module App.FactoryDispatcher, line 29, in __bobo_traverse__ Module App.Product, line 66, in _product AttributeError: ZTM2 TIA - have a nice day, Florian -- Florian Konnertz --- http://www.florian-konnertz.de http://openspirit.homelinux.net/noowiki/FrontPage Improved ZWiki about all topics, especially consciousness research and wisdom traditions
Florian Konnertz wrote at 2003-4-9 19:54 +0200:
I am diving into ZopeTopicMaps these days and make good progress. I can add TopicMaps and everything by hand to a CMFsite.
When importing the xtm file via http://grooveway:9080/openspirit.de/cmftest/System/TopicMap/topicmap_edit_fo... i get the following error. .... Module Products.CMFCore.TypesTool, line 503, in constructInstance Module Products.CMFCore.TypesTool, line 451, in _getFactoryMethod Module App.FactoryDispatcher, line 26, in __getitem__ Module App.FactoryDispatcher, line 29, in __bobo_traverse__ Module App.Product, line 66, in _product AttributeError: ZTM2
Looks as if the "factory_type_information" for ZTM where wrong (--> "portal_types"). Apparently, the construction looks for "ZTM2" in the products and does not find it. Dieter
Dieter Maurer wrote:
Florian Konnertz wrote at 2003-4-9 19:54 +0200:
I am diving into ZopeTopicMaps these days and make good progress. I can add TopicMaps and everything by hand to a CMFsite.
When importing the xtm file via http://grooveway:9080/openspirit.de/cmftest/System/TopicMap/topicmap_edit_fo... i get the following error. .... Module Products.CMFCore.TypesTool, line 503, in constructInstance Module Products.CMFCore.TypesTool, line 451, in _getFactoryMethod Module App.FactoryDispatcher, line 26, in __getitem__ Module App.FactoryDispatcher, line 29, in __bobo_traverse__ Module App.Product, line 66, in _product AttributeError: ZTM2
Looks as if the "factory_type_information" for ZTM where wrong (--> "portal_types").
Apparently, the construction looks for "ZTM2" in the products and does not find it.
Hi Dieter! First of all thanks for answering. It seems as if you care for as many as possible open questions on the list, much respect for this - it's a good motivation! The prob was easier to solve than i expected. Just FYI and for other interested people - no more question below :-) ------------ The factory_type_information are ok, aren't they. Is it this: contentFactoryTypeInfos = (ZTopicMap.factory_type_information + ZTopic.factory_type_information + ZBaseName.factory_type_information + ZOccurrence.factory_type_information + ZAssociation.factory_type_information + ZAssociationRole.factory_type_information) in __init__.py ?? But i was confused from the beginning by the name of the product "ztm2". It'd be better to use the convention and name it ZTM2 in capitals, at least the first Z. Apparently Zope looks for the attribute "ZTM2", so i grepped for that string. ZAssociation.py: 'product': 'ZTM2', Binary file ZAssociation.pyc matches ZAssociationRole.py: 'product': 'ZTM2', Binary file ZAssociationRole.pyc matches ZBaseName.py: 'product': 'ZTM2', Binary file ZBaseName.pyc matches ZOccurrence.py: 'product': 'ZTM2', Binary file ZOccurrence.pyc matches ZTopic.py: 'product': 'ZTM2', Binary file ZTopic.pyc matches ZTopicMap.py: 'product': 'ZTM2', Binary file ZTopicMap.pyc matches The product is called ZTM2. But in ControlPanel/Products it is listed as ztm2. Not good. --- I greped for "ztm2" and changed all places to ZTM2, mostly (all?) in the CVS dirs. Restarted zope, new product ZTM2 is found; deleted old product ztm2, --> Import is fine now. -- Florian Konnertz --- http://www.florian-konnertz.de http://openspirit.homelinux.net/noowiki/FrontPage Improved ZWiki about all topics, especially consciousness research and wisdom traditions
participants (2)
-
Dieter Maurer -
Florian Konnertz