Skip to content

Commit 15ccf79

Browse files
committed
Log errors importing or initializing download handlers
1 parent d3804b3 commit 15ccf79

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scrapy/core/downloader/handlers/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,16 @@ def _get_handler(self, scheme):
4343
'no handler available for that scheme'
4444
return None
4545

46+
path = self._schemes[scheme]
4647
try:
47-
dhcls = load_object(self._schemes[scheme])
48+
dhcls = load_object(path)
4849
dh = dhcls(self._crawler_settings)
4950
except NotConfigured as ex:
5051
self._notconfigured[scheme] = str(ex)
5152
return None
5253
except Exception as ex:
53-
logger.exception()
54+
logger.exception('Loading "{}" for scheme "{}" handler'\
55+
.format(path, scheme))
5456
self._notconfigured[scheme] = str(ex)
5557
return None
5658
else:

0 commit comments

Comments
 (0)