|
1 | 1 | from __future__ import absolute_import, division, print_function
|
2 | 2 |
|
| 3 | +import logging |
3 | 4 | from collections import namedtuple
|
4 | 5 | from contextlib import contextmanager
|
5 | 6 | from warnings import warn
|
|
10 | 11 | from .compatibility import map
|
11 | 12 | from .utils import expand_tuples, ignoring
|
12 | 13 |
|
| 14 | +log = logging.getLogger(__name__) |
13 | 15 |
|
14 | 16 | ooc_types = set() # Out-of-Core types
|
15 | 17 |
|
@@ -101,11 +103,16 @@ def _transform(graph, target, source, excluded_edges=None, ooc_types=ooc_types,
|
101 | 103 | path_proxy = IterProxy(pth)
|
102 | 104 | for convert_from, convert_to, f, cost in path_proxy:
|
103 | 105 | try:
|
| 106 | + log.debug('Transforming %s -> %s', A.__name__, B.__name__, |
| 107 | + extra={'kwargs': kwargs, 'f': f, 'excluded_edges': excluded_edges} |
| 108 | + ) |
104 | 109 | x = f(x, excluded_edges=excluded_edges, **kwargs)
|
105 | 110 | except NotImplementedError as e:
|
106 | 111 | if kwargs.get('raise_on_errors'):
|
107 | 112 | raise
|
108 |
| - warn(FailedConversionWarning(convert_from, convert_to, e)) |
| 113 | + log.warning('Failed on %s -> %s. Working around\nError message:\n%s', |
| 114 | + A.__name__, B.__name__, e |
| 115 | + ) |
109 | 116 |
|
110 | 117 | # exclude the broken edge
|
111 | 118 | excluded_edges |= {(convert_from, convert_to)}
|
|
0 commit comments