Scrapy, a fast high-level web crawling & scraping framework for Python.
Added needed conversion from unicode to string before using twisted's logging system because it may trigger encoding issues
elpolilla2cfd292f0159
diff --git a/scrapy/trunk/scrapy/log/__init__.py b/scrapy/trunk/scrapy/log/__init__.pyindex ea3e1fcd6..bd0a17ee1 100644--- a/scrapy/trunk/scrapy/log/__init__.py+++ b/scrapy/trunk/scrapy/log/__init__.py@@ -6,6 +6,7 @@ import sysfrom twisted.python import logfrom scrapy.conf import settings+from scrapy.utils.python import unicode_to_str# Logging levelslevels = {@@ -48,7 +49,8 @@ def msg(message, level=INFO, component=BOT_NAME, domain=None):""" Log message according to the level """component = "%s/%s" % (BOT_NAME, domain) if domain else componentif level <= log_level:- log.msg("%s: %s" % (levels[level], message), system=component)+ msg_txt = unicode_to_str("%s: %s" % (levels[level], message))+ log.msg(msg_txt, system=component)def exc(message, level=ERROR, component=BOT_NAME, domain=None):from traceback import format_exc