[Zope-dev] 'import Zope' problem

Ibañez Palomar Juan David al028823@alumail.uji.es
Wed, 6 Sep 2000 11:38:09 +0200 (DFT)


This bug was reported to the Debian bug tracking system, look at 

  http://cgi.debian.org/cgi-bin/bugreport.cgi?bug=61446

Do,

$ export INSTANCE_HOME=/var/lib/zope
...


> 
> Hi everybody,
> 
> I am quite new to Zope and I want to use the Python debugger as
> described in the How-To: The Debugger Is Your Friend.
> 
> I installed Zope with the Debian zope package version 2.1.6-5, so my
> zope directory is /usr/lib/zope (this is where I have a lib/python
> directory), but I have my 'access' file in /var/lib/zope.
> 
> That's why when I am in /usr/lib/zope/lib/python and I start python and
> then I type "import Zope" I get a 'No access file found' error.
> 
> Here is the transcript
> 
> (1)bash://root@constance/var/lib/zope
> # cd /usr/lib/zope/lib/python
> /usr/lib/zope/lib/python
> (1)bash://root@constance/usr/lib/zope/lib/python
> # python
> Python 1.5.2 (#0, Apr  3 2000, 14:46:48)  [GCC 2.95.2 20000313 (Debian
> GNU/Linux)] on linux2
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> import Zope
> Traceback (innermost last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/zope/lib/python/Zope/__init__.py", line 95, in ?
>     import Globals, OFS.Application, sys
>   File "/usr/lib/zope/lib/python/OFS/Application.py", line 96, in ?
>     from AccessControl.User import UserFolder
>   File "/usr/lib/zope/lib/python/AccessControl/User.py", line 294, in ?
>     raise 'InstallError', (
> InstallError: No access file found at /usr/lib/zope - see INSTALL.txt
> >>>
> 
> In /usr/lib/zope/lib/python/AccessControl/User.py the code look like
> this:
> 
> _remote_user_mode=0
> try:
>     f=open('%s/access' % INSTANCE_HOME, 'r')
> except IOError:
>     raise 'InstallError', (
>         'No access file found at %s - see INSTALL.txt' % INSTANCE_HOME
>         )
> 
> 
> Is the Debian package wrong or is the User.py code wrong ?
> 
> Can I just change INSTANCE_HOME with "/var/lib/zope"  in the User.py
> code ?
> 
> Does this bug prevent the debugger from working ?
> 
> Thanks in advance for your help.
> 
> --
> Christian COUDER christian@alcove.fr
> Ingénieur Informatique Libre
> Alcôve - http://www.alcove.fr/
> 
> 
> 
> 
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
> 
>