[Zope] first attempt to use RELSTORAGE

David Bear David.Bear at asu.edu
Fri May 9 12:05:06 EDT 2008


I installed relstorage using the instructions for easy_setup, i.e.
'easy_install RelStorage'. I realized as I read through more of the
instructions that this likely put the relstorage modules in my python home
rather than in my zope software home. I don't know if this would have caused
the error I am seeing.

However, after reading more through the instructions, and watching
easy_install do its magic, I reached a point where I make a new zope
instance, then when in to that instance home and modified the zope.conf  to
use relstorage instead of filestorage, I was ready to start my new instance.
I was disappointed to have a traceback just running zopectl. I ran
$INSTANCE_HOME/bin/zopectl

and got the following traceback:

Traceback (most recent call last):
 File "/servers/webenv1/lib/python/Zope2/Startup/zopectl.py", line 329, in ?
   main()
 File "/servers/webenv1/lib/python/Zope2/Startup/zopectl.py", line 287, in
main
   options.realize(args)
 File "/servers/webenv1/lib/python/Zope2/Startup/zopectl.py", line 95, in
realize
   ZDOptions.realize(self, *args, **kw)
 File
"/servers/webenv1/lib/python2.4/site-packages/zdaemon-2.0.2-py2.4.egg/zdaemon/zdoptions.py",
line 279, in realize
   self.load_schema()
 File
"/servers/webenv1/lib/python2.4/site-packages/zdaemon-2.0.2-py2.4.egg/zdaemon/zdoptions.py",
line 327, in load_schema
   self.schema = ZConfig.loadSchema(self.schemafile)
 File
"/servers/webenv1/lib/python2.4/site-packages/ZConfig-2.5.1-py2.4.egg/ZConfig/loader.py",
line 32, in loadSchema
   return SchemaLoader().loadURL(url)
 File
"/servers/webenv1/lib/python2.4/site-packages/ZConfig-2.5.1-py2.4.egg/ZConfig/loader.py",
line 66, in loadURL
   return self.loadResource(r)
 File
"/servers/webenv1/lib/python2.4/site-packages/ZConfig-2.5.1-py2.4.egg/ZConfig/loader.py",
line 187, in loadResource
   schema = ZConfig.schema.parseResource(resource, self)
 File
"/servers/webenv1/lib/python2.4/site-packages/ZConfig-2.5.1-py2.4.egg/ZConfig/schema.py",
line 27, in parseResource
   xml.sax.parse(resource.file, parser)
 File "/servers/webenv1//lib/python2.4/xml/sax/__init__.py", line 33, in
parse
   parser.parse(source)
 File "/servers/webenv1//lib/python2.4/xml/sax/expatreader.py", line 107, in
parse
   xmlreader.IncrementalParser.parse(self, source)
 File "/servers/webenv1//lib/python2.4/xml/sax/xmlreader.py", line 123, in
parse
   self.feed(buffer)
 File "/servers/webenv1//lib/python2.4/xml/sax/expatreader.py", line 207, in
feed
   self._parser.Parse(data, isFinal)
 File "/servers/webenv1//lib/python2.4/xml/sax/expatreader.py", line 300, in
start_element
   self._cont_handler.startElement(name, AttributesImpl(attrs))
 File
"/servers/webenv1/lib/python2.4/site-packages/ZConfig-2.5.1-py2.4.egg/ZConfig/schema.py",
line 99, in startElement
   getattr(self, "start_" + name)(attrs)
 File
"/servers/webenv1/lib/python2.4/site-packages/ZConfig-2.5.1-py2.4.egg/ZConfig/schema.py",
line 475, in start_schema
   keytype, valuetype, datatype = self.get_sect_typeinfo(attrs)
 File
"/servers/webenv1/lib/python2.4/site-packages/ZConfig-2.5.1-py2.4.egg/ZConfig/schema.py",
line 201, in get_sect_typeinfo
   datatype = self.get_datatype(attrs, "datatype", "null", base)
 File
"/servers/webenv1/lib/python2.4/site-packages/ZConfig-2.5.1-py2.4.egg/ZConfig/schema.py",
line 194, in get_datatype
   return self._registry.get(dtname)
 File
"/servers/webenv1/lib/python2.4/site-packages/ZConfig-2.5.1-py2.4.egg/ZConfig/datatypes.py",
line 398, in get
   t = self.search(name)
 File
"/servers/webenv1/lib/python2.4/site-packages/ZConfig-2.5.1-py2.4.egg/ZConfig/datatypes.py",
line 423, in search
   package = __import__(n, g, g, component)
 File "/servers/webenv1/lib/python/Zope2/Startup/datatypes.py", line 21, in
?
   import OFS.Uninstalled
 File "/servers/webenv1/lib/python/OFS/Uninstalled.py", line 20, in ?
   import SimpleItem, Globals, Acquisition
 File "/servers/webenv1/lib/python/OFS/SimpleItem.py", line 26, in ?
   import AccessControl.Role, AccessControl.Owned, App.Common
 File "/servers/webenv1/lib/python/AccessControl/__init__.py", line 17, in ?
   from Implementation import setImplementation
 File "/servers/webenv1/lib/python/AccessControl/Implementation.py", line
98, in ?
   setImplementation("C")
 File "/servers/webenv1/lib/python/AccessControl/Implementation.py", line
51, in setImplementation
   from AccessControl import ImplC as impl
 File "/servers/webenv1/lib/python/AccessControl/ImplC.py", line 18, in ?
   from cAccessControl import rolesForPermissionOn, \
 File "/servers/webenv1/lib/python/AccessControl/SimpleObjectPolicies.py",
line 82, in ?
   from DocumentTemplate.DT_Util import TemplateDict
 File "/servers/webenv1/lib/python/DocumentTemplate/__init__.py", line 21,
in ?
   from DocumentTemplate import String, File, HTML, HTMLDefault, HTMLFile
 File "/servers/webenv1/lib/python/DocumentTemplate/DocumentTemplate.py",
line 112, in ?
   from DT_String import String, File
 File "/servers/webenv1/lib/python/DocumentTemplate/DT_String.py", line 19,
in ?
   from DT_Util import ParseError, InstanceDict, TemplateDict,
render_blocks, str
 File "/servers/webenv1/lib/python/DocumentTemplate/DT_Util.py", line 67, in
?
   from ZPublisher.TaintedString import TaintedString
 File "/servers/webenv1/lib/python/ZPublisher/__init__.py", line 24, in ?
   from Publish import publish_module, Retry
 File "/servers/webenv1/lib/python/ZPublisher/Publish.py", line 24, in ?
   from zope.app.publication.browser import setDefaultSkin
 File "/servers/webenv1/lib/python/zope/app/publication/browser.py", line
33, in ?
   from zope.app.publication.http import BaseHTTPPublication
 File "/servers/webenv1/lib/python/zope/app/publication/http.py", line 27,
in ?
   from zope.app.publication.zopepublication import ZopePublication
 File "/servers/webenv1/lib/python/zope/app/publication/zopepublication.py",
line 46, in ?
   from zope.app.security.principalregistry import principalRegistry as
prin_reg
 File "/servers/webenv1/lib/python/zope/app/security/principalregistry.py",
line 20, in ?
   from zope.app.authentication.interfaces import IPasswordManager
 File "/servers/webenv1/lib/python/zope/app/authentication/__init__.py",
line 20, in ?
   from zope.app.authentication.authentication import
PluggableAuthentication
 File
"/servers/webenv1/lib/python/zope/app/authentication/authentication.py",
line 25, in ?
   from zope.app.component.site import SiteManagementFolder
 File "/servers/webenv1/lib/python/zope/app/component/site.py", line 35, in
?
   from zope.app.component import adapter
 File "/servers/webenv1/lib/python/zope/app/component/adapter.py", line 28,
in ?
   class LocalSurrogate(zope.interface.adapter.Surrogate):
AttributeError: 'module' object has no attribute 'Surrogate'


for more information, there is another zope instance running on this machine
however there is only 1 zope_home. Furthermore, what I couldn't discern from
the install instructions for relstorage was configuration for postgresql.
Since the instructions were silent, I assumed I at least needed a pg user
for zope to connect as, and a database to contain the zodb. So I created
these in pg so the dsn in zope.conf would at least have something valid to
connect to.

Any adivce?

I think I will need to back out of what easy_install did to my pythonhome --
is there an easy way to undo what easy_install did ?


-- 
David Bear
College of Public Programs at ASU
602-464-0424
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20080509/b8f29736/attachment.html


More information about the Zope mailing list