getsentry / raven-python

Raven is the legacy Python client for Sentry (getsentry.com) — replaced by sentry-python
https://sentry.io
BSD 3-Clause "New" or "Revised" License
1.68k stars 657 forks source link

TypeError w/ __repr__ when using plone/zope #1310

Closed lobsterkatie closed 5 years ago

lobsterkatie commented 6 years ago

A user reports that whenever an OPTIONS request is made to a Plone application (running Zope) this issue occurs:

==> client2-event.log <== 
------ 
2018-11-27T09:58:57 ERROR Zope.SiteErrorLog 1543283937.330.238564883427 https://website.com/file.txt 
Traceback (innermost last): 
Module ZPublisher.Publish, line 127, in publish 
Module ZPublisher.BaseRequest, line 479, in traverse 
Module zope.browserresource.file, line 94, in browserDefault 
AttributeError: 'FileResource' object has no attribute 'OPTIONS' 
------ 
2018-11-27T09:58:57 ERROR sentry.errors.serializer unbound method __repr__() must be called with Application instance as first argument (got nothing instead) 
Traceback (most recent call last): 
File "/home/plone/eggs/raven-6.8.0-py2.7.egg/raven/utils/serializer/manager.py", line 76, in transform 
return repr(value) 
TypeError: unbound method __repr__() must be called with Application instance as first argument (got nothing instead) 
------ 
2018-11-27T09:58:57 ERROR sentry.errors.serializer unbound method __repr__() must be called with Application instance as first argument (got nothing instead) 
Traceback (most recent call last): 
File "/home/plone/eggs/raven-6.8.0-py2.7.egg/raven/utils/serializer/manager.py", line 76, in transform 
return repr(value) 
TypeError: unbound method __repr__() must be called with Application instance as first argument (got nothing instead)

This has also been reported here.

mitsuhiko commented 5 years ago

The issue is silenced already it’s just that the logger still shows up. Just silence the error logger in this case.

The actual bug is somewhere in zope.