You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quanto tem erro gerando htmls não é possível ver o erro certo, porque é levantada outra exceção:
Exemplo:
Traceback (most recent call last):
File ""/usr/local/lib/python2.7/site-packages/rq/worker.py"", line 768, in perform_job
rv = job.perform()
File ""/usr/local/lib/python2.7/site-packages/rq/job.py"", line 558, in perform
self._result = self._execute()
File ""/usr/local/lib/python2.7/site-packages/rq/job.py"", line 564, in _execute
return self.func(*self.args, **self.kwargs)
File ""/app/opac_proc/transformers/jobs.py"", line 183, in task_transform_article
transformer.transform()
File ""/app/opac_proc/extractors/decorators.py"", line 16, in wrapped
extract_method(*args, **kwargs)
File ""/app/opac_proc/transformers/tr_articles.py"", line 179, in transform
self.transform_model_instance['htmls'] = asset_html.register_from_xml(uuid)
File ""/app/opac_proc/core/assets.py"", line 744, in register_from_xml
generated_htmls = self.generate_htmls(BytesIO(asset['file']))
File ""/app/opac_proc/core/assets.py"", line 626, in generate_htmls
logger.error(""Erro gerando o HTML: "", error)
File ""/usr/local/lib/python2.7/logging/__init__.py"", line 1192, in error
Log 'msg % args' with severity 'ERROR'.
File ""/usr/local/lib/python2.7/logging/__init__.py"", line 1200, in error
self._log(ERROR, msg, args, **kwargs)
File ""/usr/local/lib/python2.7/logging/__init__.py"", line 1293, in _log
self.handle(record)
File ""/usr/local/lib/python2.7/logging/__init__.py"", line 1303, in handle
self.callHandlers(record)
File ""/usr/local/lib/python2.7/logging/__init__.py"", line 1343, in callHandlers
hdlr.handle(record)
File ""/usr/local/lib/python2.7/logging/__init__.py"", line 766, in handle
self.emit(record)
File ""/usr/local/lib/python2.7/site-packages/mongolog/handlers.py"", line 68, in emit
self.collection.insert(self.format(record))
File ""/usr/local/lib/python2.7/logging/__init__.py"", line 741, in format
return fmt.format(record)
File ""/usr/local/lib/python2.7/site-packages/mongolog/handlers.py"", line 22, in format
record.msg = record.msg % record.args
TypeError: not all arguments converted during string formatting
linha que levanta a nova exceção:
File ""/app/opac_proc/core/assets.py"", line 626,
Na chamada para escrever o log.error falta "%s":
logger.error("Erro gerando o HTML: ", error)
correção
adicionar %s na mensagem de log:
logger.error("Erro gerando o HTML: %s", error)
The text was updated successfully, but these errors were encountered:
Quanto tem erro gerando htmls não é possível ver o erro certo, porque é levantada outra exceção:
Exemplo:
linha que levanta a nova exceção:
Na chamada para escrever o log.error falta "%s":
correção
adicionar
%s
na mensagem de log:The text was updated successfully, but these errors were encountered: