[Zope] OSError along with FSSession...

Dieter Maurer dieter@handshake.de
Thu, 7 Sep 2000 21:57:43 +0200 (CEST)

Chien-Pin Wang writes:
 >      Zope complains an error type "OSError" and throws the error value
 > saying [Errno 21] Is a directory: '/usr/local/zope/var/FSSession/'
 > occasionally since a recent upgrade of FSSession product to 0.4.2.
 > Following that error will be a series of TransactionErrors for each and
 > every request Zope received. And only a zope restart could help zope
 > resume its operations. Since this error only comes up occasionally, I'm
 > completely clueless on solving it. 
 > ....
 >   File /usr/local/zope/lib/python/Products/FSSession/FSSession.py, line
 > 208, in
 > final_commit
 >     (Object: FSSession)
 > OSError: [Errno 21] Is a directory: '/usr/local/zope/var/FSSession/'

Maybe, a bug in "FSSession.final_commit".

Look at line 208 of "FSSession.py".
I expect some lines before, a filename is constructed
for the above directory and session specific data.
For some reason, the session specific data leads to
an empty filename. Therefore, the operation in
line 208 (probably an "os.rename" or other "os" operation)
gets the directory rather than a file path.

You have two options:

 * analyse, why the session data leads to an empty filename
   (this may be difficult)

 * add a
    try: ...
    except: pass

   around line 208 and wait for the FSSession author
   to analyse and fix the problem.