Hi, I am trying to install LocalFS 0.9.6 on Zope 2.3.0 and get the following error: Error Type: AttributeError Error Value: _local_path Traceback (innermost last): File /opt2/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 222, in publish_module File /opt2/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 187, in publish File /opt2/Zope-2.3.0-src/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File /opt2/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 171, in publish File /opt2/Zope-2.3.0-src/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: manage_main) File /opt2/Zope-2.3.0-src/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: manage_main) File /opt2/Zope-2.3.0-src/lib/python/Shared/DC/Scripts/Bindings.py, line 324, in __call__ (Object: manage_main) File /opt2/Zope-2.3.0-src/lib/python/Shared/DC/Scripts/Bindings.py, line 353, in _bindAndExec (Object: manage_main) File /opt2/Zope-2.3.0-src/lib/python/App/special_dtml.py, line 236, in _exec (Object: manage_main) File /opt2/Zope-2.3.0-src/lib/python/DocumentTemplate/DT_In.py, line 711, in renderwob (Object: objectItems) File /opt2/Zope-2.3.0-src/lib/python/DocumentTemplate/DT_With.py, line 146, in render (Object: sequence-key) File /opt2/Zope-2.3.0-src/lib/python/DocumentTemplate/DT_Var.py, line 271, in render (Object: bobobase_modification_time) File /opt2/Zope-2.3.0-src/lib/python/Products/LocalFS/LocalFS.py, line 979, in bobobase_modification_time (Object: rafiles) AttributeError: (see above) this seems to add the localfs but makes listing the contents of the containg folder impossible. What's ging on here? thanks --Oliver
On Wed, Jan 31, 2001 at 01:05:28PM +0100, Oliver Frommel wrote:
I am trying to install LocalFS 0.9.6 on Zope 2.3.0 and get the following error:
Error Type: AttributeError Error Value: _local_path
LocalFS needs several patches for Zope 2.3.0. I've attached a patch script that shows what I've had to do so far. Others created the original patches -- I'm just passing on what I learned. LocalFS is working OK for me now, AFAICT. -- Fred Yankowski fred@OntoSys.com tel: +1.630.879.1312 Principal Consultant www.OntoSys.com fax: +1.630.879.1370 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA -- --- LocalFS.py.orig Thu Oct 19 02:42:20 2000 +++ LocalFS.py Mon Jan 29 17:49:57 2001 @@ -270,7 +270,10 @@ _local_path = None def bobobase_modification_time(self): - t = os.stat(self._local_path)[stat.ST_MTIME] + if not hasattr(self, '_local_path'): + self._local_path = self.basepath + try: t = os.stat(self._local_path)[stat.ST_MTIME] + except: t = time.time() return DateTime(t) def __repr__(self): @@ -976,7 +979,8 @@ except 'Forbidden': pass def bobobase_modification_time(self): - t = os.stat(self._local_path)[stat.ST_MTIME] + try: t = os.stat(self._local_path)[stat.ST_MTIME] + except: t = time.time() return DateTime(t) class LocalFile( @@ -1179,7 +1183,7 @@ """Change the properties of the file system object.""" self.title = title - self.basepath = os.path.normpath(basepath) + self.basepath = self._local_path = os.path.normpath(basepath) self.default_document = default_document or self.default_document self.tree_view = self.isPrincipiaFolderish = tree_view self.catalog = catalog
Oliver Frommel wrote:
this seems to add the localfs but makes listing the contents of the containg folder impossible. What's ging on here?
http://zope.nipltd.com/public/lists/zope-archive.nsf/ByKey/61B0755228EDCCB7 Just yesterday. The mailing list archives are a wonderful resource. -- Tim Cook, President -- Free Practice Management,Inc. | http://www.FreePM.com Office: (901) 884-4126 "Liberty has never come from the government." - Woodrow Wilson
participants (3)
-
Fred Yankowski -
Oliver Frommel -
Tim Cook