[ZWeb] Problems with /acl_users

Shane Hathaway shane@digicool.com
Tue, 26 Sep 2000 10:23:23 -0400 (EDT)


On Tue, 26 Sep 2000, Martijn Pieters wrote:

> On Tue, Sep 26, 2000 at 10:05:35AM -0400, Shane Hathaway wrote:
> > On Tue, 26 Sep 2000, Martijn Pieters wrote:
> > 
> > > On Tue, Sep 26, 2000 at 09:13:22AM -0400, Shane Hathaway wrote:
> > > I can't connect to the server, it seems:
> > > 
> > > INSTANCE_HOME=/usr/local/dc/org python
> > > ...
> > > >>> import Zope
> > > Traceback (innermost last):
> > >   File "<stdin>", line 1, in ?
> > >   File "/usr/local/dc/Zope2/lib/python/Zope/__init__.py", line 118, in ?
> > >     DB=ZODB.DB(DB)
> > >   File "/usr/local/dc/zope_soft/lib/python/ZODB/DB.py", line 155, in __init__
> > >     storage.tpc_begin(t)
> > >   File "/usr/local/dc/zope_soft/lib/python/ZEO/ClientStorage.py", line 457, in tpc_begin
> > >     if not self._connected: raise ClientDisconnected()
> > > ZEO.ClientStorage.ClientDisconnected
> > 
> > You may need to have root privileges in order to get access to the socket
> > file that connects to ZEO.
> 
> sudo python and I get one step further (os.environ['INSTANCE_HOME'] is
> correct:
> 
> >>> import Zope
> Traceback (innermost last):
>   File "<stdin>", line 1, in ?
>   File "/usr/local/dc/Zope2/lib/python/Zope/__init__.py", line 118, in ?
>     DB=ZODB.DB(DB)
>   File "/usr/local/dc/zope_soft/lib/python/ZODB/DB.py", line 144, in __init__
>     storage.registerDB(self, None)
>   File "/usr/local/dc/zope_soft/lib/python/ZEO/ClientStorage.py", line 193, in registerDB
>     self._startup()
>   File "/usr/local/dc/zope_soft/lib/python/ZEO/ClientStorage.py", line 197, in _startup
>     if not self._call.connect():
>   File "/usr/local/dc/zope_soft/lib/python/ZEO/zrpc.py", line 150, in connect
>     self.aq_parent.notifyConnected(s)
>   File "/usr/local/dc/zope_soft/lib/python/ZEO/ClientStorage.py", line 218, in notifyConnected
>     self._call.finishConnect(s)
>   File "/usr/local/dc/zope_soft/lib/python/ZEO/zrpc.py", line 154, in finishConnect
>     SizedMessageAsyncConnection.__init__(self, s, {})
>   File "/usr/local/dc/Zope2/lib/python/ZEO/smac.py", line 100, in __init__
>     SizedMessageAsyncConnection.inheritedAttribute(
> TypeError: too many arguments; expected 2, got 3

It is important to import ZServer before Zope.  I made precisely the same
mistake you did.  Ethan laughed at me.  (grrr...) :-)

> 
> About User.py trying to sort the usernames:
> > > > It would be possible to fix this by calling list() on the returned set.
> > > 
> > > This means changing AccessControl/User.py, or implementing an External
> > > Method version of getUserNames() (and getUsers())
> > 
> > Yep.  What do you think--should we update User.py or change back to a
> > PersistentMapping?
> 
> I'll change /usr/local/dc/org/Extensions/Membership.py::MeberFolder. It is
> the base class for the Zope.org MemberFolder ZClass.

Sounds good.  (I'm not sure how to get zope.org to reload the class,
however, since it's in production mode.  You may need to restart.)

> 
> > > I believe that __getattr__ isn't implemented on BTreeFolder?
> > > app.Members.mj didn't work.
> > 
> > Right.  There are two kinds of BTreeFolders and Jim wanted the one with
> > no __getattr__.  That meant I had to move all of the DTML methods and
> > External Methods out of /Members and into the root.  :-/
> 
> Okay. Let's hope then that there is no code counting on __getattr__ being
> implemented then.

Crossing fingers...

Shane