#19 TypeError masking exception on server

open
None
5
2002-11-12
2002-04-29
No

We see quite a few of these errors:

Traceback (innermost last):
File /usr/local/zope/2.5.1b1_base/z2.py, line 495, in ?
File <string>, line 1, in ?
File /usr/local/zope/2.5.1b1/lib/python/Zope/__init__.py, line 45, in ?
File /usr/local/zope/2.5.1b1/lib/python/ZODB/DB.py, line 77, in __init__
File /usr/local/zope/2.5.1b1_base/lib/python/ZEO/ClientStorage.py, line 365, in load
(Object: ('x', xxxx))
File /usr/local/zope/2.5.1b1_base/lib/python/ZEO/zrpc.py, line 239, in __call__
TypeError: exceptions must be strings, classes, or instances, not None

...which indicates an exception is being raised on the storage server.

However, the way the exceptions are being dealt with means the true exception type
is being masked and this meaningless error is being returned.

Unfortunately, frequently no matching error can be found in the server logs and so we never do
find the cause :-(

I suspect that one possible cause of this may be when an exception is raised on the server and the
exception class cannot be found on the client and so cannot properly be raised. Degrading to
displaying a string of the exception name would be mroe useful here.

That said, that's only a guess ;-)

cheers,

Chris

Discussion

  • Jeremy Hylton

    Jeremy Hylton - 2002-04-29

    Logged In: YES
    user_id=31392

    Thanks for the explanation. We may be able to do something
    more sensible, although it's not clear what since all we're
    left with is an unpicklable pickle.

     
  • Jeremy Hylton

    Jeremy Hylton - 2002-04-29
    • assigned_to: nobody --> jhylton
     
  • Chris Withers

    Chris Withers - 2002-04-29

    Logged In: YES
    user_id=24723

    Well, just to make sure you know, that's only a hypothesis. I'm damn sure there are other things which
    cause the problem other than exception classes not being present...

    As for what to do, well, a pickle must have the classname in it? If so, a string representation of that would
    be the best idea :-)

     
  • Guido van Rossum

    Logged In: YES
    user_id=6380

    Is this still relevant with Zope 2.6 and ZODB 3.1?

     
  • Guido van Rossum

    • priority: 5 --> 1
     
  • Chris Withers

    Chris Withers - 2002-11-12

    Logged In: YES
    user_id=24723

    More than likely, ask Jeremy if he found a nicer way.
    Personally, I'd prefer to at least see the class name in the
    error, even if that class couldn't be imported on the client.

     
  • Chris Withers

    Chris Withers - 2002-11-12
    • priority: 1 --> 5
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks