Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Yet another celery - sentry integration issue #167

Closed
23doors opened this issue Aug 6, 2012 · 3 comments
Closed

Yet another celery - sentry integration issue #167

23doors opened this issue Aug 6, 2012 · 3 comments

Comments

@23doors
Copy link

23doors commented Aug 6, 2012

Whenever error occurs within celery I am getting:

WARNING 2012-08-06 18:07:34,498 celery.redirected: /opt/local/srv/python-environments/hydra/lib/python2.7/site-packages/celery/task/trace.py:306: RuntimeWarning: Exception raised outside body: AttributeError("'str' object has no attribute 'tb_frame'",):
Traceback (most recent call last):
  File "/opt/local/srv/python-environments/hydra/lib/python2.7/site-packages/celery/task/trace.py", line 223, in trace_task
    R = I.handle_error_state(task, eager=eager)
  File "/opt/local/srv/python-environments/hydra/lib/python2.7/site-packages/celery/task/trace.py", line 92, in handle_error_state
    }[self.state](task, store_errors=store_errors)
  File "/opt/local/srv/python-environments/hydra/lib/python2.7/site-packages/celery/task/trace.py", line 124, in handle_failure
    einfo=einfo)
  File "/opt/local/srv/python-environments/hydra/lib/python2.7/site-packages/celery/utils/dispatch/signal.py", line 146, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/Users/V/PycharmProjects/hydra/hydra_core/tasks.py", line 29, in process_failure_signal
    'kwargs': kwargs,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 1166, in error
    self._log(ERROR, msg, args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 1258, in _log
    self.handle(record)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 1268, in handle
    self.callHandlers(record)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 1308, in callHandlers
    hdlr.handle(record)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 748, in handle
    self.emit(record)
  File "/opt/local/srv/python-environments/hydra/lib/python2.7/site-packages/raven/handlers/logging.py", line 51, in emit
    self.format(record)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 723, in format
    return fmt.format(record)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 472, in format
    record.exc_text = self.formatException(record.exc_info)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 438, in formatException
    traceback.print_exception(ei[0], ei[1], ei[2], None, sio)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/traceback.py", line 125, in print_exception
    print_tb(tb, limit, file)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/traceback.py", line 61, in print_tb
    f = tb.tb_frame
AttributeError: 'str' object has no attribute 'tb_frame'

Any uncaught exception causes this. Reported to celery as well as I am not sure where this issue lies.

@dcramer
Copy link
Member

dcramer commented Aug 6, 2012

It seems I failed at doing email here, but the relevant bits are:

raven==2.0.3
sentry==4.8.6

kombu==2.3.2
celery==3.0.5

I'll ensure that we dont hard-fail with exceptions in Raven, but this appears to be an issue in Celery

/cc @ask @dctrwatson

@23doors
Copy link
Author

23doors commented Aug 6, 2012

Thanks! I already opened an issue there.

@dcramer dcramer closed this as completed in 21386e4 Aug 6, 2012
@adepue
Copy link

adepue commented Aug 21, 2012

Seems this would be fixed with the following PR I just created into celery:
celery/celery#927

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants