Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in logging #899

Closed
mtirsel opened this issue Aug 2, 2012 · 2 comments
Closed

Exception in logging #899

mtirsel opened this issue Aug 2, 2012 · 2 comments

Comments

@mtirsel
Copy link

mtirsel commented Aug 2, 2012

I am getting an exception in celery logs but when I run my function normally, it is working so it is probably something in the celery code. It happens when I am creating or saving one model (when I create/save this model from the shell, no exception is risen). Perhaps something with non ascii characters and SQL commands being printed in these logs?

[2012-08-02 14:47:46,750: WARNING/PoolWorker-1] Traceback (most recent call last):
[2012-08-02 14:47:46,750: WARNING/PoolWorker-1] File "/usr/lib/python2.6/logging/__init__.py", line 776, in emit
[2012-08-02 14:47:46,751: WARNING/PoolWorker-1] msg = self.format(record)
[2012-08-02 14:47:46,751: WARNING/PoolWorker-1] File "/usr/lib/python2.6/logging/__init__.py", line 654, in format
[2012-08-02 14:47:46,751: WARNING/PoolWorker-1] return fmt.format(record)
[2012-08-02 14:47:46,752: WARNING/PoolWorker-1] File "/home/bruce/.virtualenv/expreso/lib/python2.6/site-packages/celery/utils/log.py", line 100, in format
[2012-08-02 14:47:46,752: WARNING/PoolWorker-1] return safe_str(logging.Formatter.format(self, record))
[2012-08-02 14:47:46,752: WARNING/PoolWorker-1] File "/usr/lib/python2.6/logging/__init__.py", line 444, in format
[2012-08-02 14:47:46,752: WARNING/PoolWorker-1] record.exc_text = self.formatException(record.exc_info)
[2012-08-02 14:47:46,752: WARNING/PoolWorker-1] File "/home/bruce/.virtualenv/expreso/lib/python2.6/site-packages/celery/utils/log.py", line 77, in formatException
[2012-08-02 14:47:46,753: WARNING/PoolWorker-1] r = logging.Formatter.formatException(self, ei)
[2012-08-02 14:47:46,753: WARNING/PoolWorker-1] File "/usr/lib/python2.6/logging/__init__.py", line 416, in formatException
[2012-08-02 14:47:46,753: WARNING/PoolWorker-1] traceback.print_exception(ei[0], ei[1], ei[2], None, sio)
[2012-08-02 14:47:46,753: WARNING/PoolWorker-1] TypeError: 'bool' object is unsubscriptable

The bool in this case is the ei variable.

@mtirsel
Copy link
Author

mtirsel commented Aug 2, 2012

I just tested to remove non ascii characters from model fields values and no exception was risen.

@ask
Copy link
Contributor

ask commented Aug 30, 2012

Try this, I have no idea why ei would have not been resolved already though.

@ask ask closed this as completed in 80dad73 Aug 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants