dquangsinh / fb2pdf

Automatically exported from code.google.com/p/fb2pdf
0 stars 0 forks source link

Mysterious log exception #43

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
[DEBUG] Converting to TeX
[DEBUG] Converting to PDF
[DEBUG] Uploading resulting file to S3
Traceback (most recent call last):
  File "/sw/lib/python2.4/logging/__init__.py", line 729, in emit
    msg = self.format(record)
  File "/sw/lib/python2.4/logging/__init__.py", line 615, in format
    return fmt.format(record)
  File "/sw/lib/python2.4/logging/__init__.py", line 403, in format
    record.message = record.getMessage()
  File "/sw/lib/python2.4/logging/__init__.py", line 274, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/sw/lib/python2.4/logging/__init__.py", line 729, in emit
    msg = self.format(record)
  File "/sw/lib/python2.4/logging/__init__.py", line 615, in format
    return fmt.format(record)
  File "/sw/lib/python2.4/logging/__init__.py", line 403, in format
    record.message = record.getMessage()
  File "/sw/lib/python2.4/logging/__init__.py", line 274, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
[DEBUG] Uploading log to S3
[DEBUG] Processing callbacks

I have no idea where it happens!

Original issue reported on code.google.com by kroko...@gmail.com on 14 Mar 2007 at 3:41

GoogleCodeExporter commented 8 years ago
it is a result of misuse of logging.exception() method
you do not need to pass exception object as a parameter.
Here is an example:

>>> try:
...     raise Exception('aaaa')
... except Exception, e:
...     logging.exception('TEXT', e)
...
Traceback (most recent call last):
  File "C:\Python24\lib\logging\__init__.py", line 706, in emit
    msg = self.format(record)
  File "C:\Python24\lib\logging\__init__.py", line 592, in format
    return fmt.format(record)
  File "C:\Python24\lib\logging\__init__.py", line 382, in format
    record.message = record.getMessage()
  File "C:\Python24\lib\logging\__init__.py", line 253, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
>>> try:
...     raise Exception('aaaa')
... except Exception, e:
...     logging.exception('TEXT')
...
ERROR:root:TEXT
Traceback (most recent call last):
  File "<stdin>", line 2, in ?
Exception: aaaa

all logging.exception() call need to be fixed. This particular problem I belive 
happen in 
fbdaemon.upload_file() call

Original comment by alex.s...@gmail.com on 14 Mar 2007 at 6:16

GoogleCodeExporter commented 8 years ago
fixed. thanks!

Original comment by kroko...@gmail.com on 14 Mar 2007 at 6:42