# Buggy code
def _multiply_seq_by_int(self, opnode, other, context):
    node = self.__class__(parent=opnode)
    elts = []
    for elt in self.elts:
        infered = helpers.safe_infer(elt, context)
        if infered is None:
            infered = util.Uninferable
        elts.append(infered)
    node.elts = elts * other.value
    return node


# Traceback (TypeError)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-13-243db1d8132c> in <module>()
23 """)
24
---> 25 parsed.accept(Visitor())

~/anaconda3/envs/py36/lib/python3.6/site-packages/astroid/node_classes.py in accept(self, visitor)
293     def accept(self, visitor):
294         func = getattr(visitor, "visit_" + self.__class__.__name__.lower())
--> 295         return func(self)
296
297     def get_children(self):

<ipython-input-13-243db1d8132c> in visit(self, node)
5     def visit(self, node):
6         for child in node.get_children():
----> 7             child.accept(self)
8     visit_module = visit
9     visit_assign = visit

~/anaconda3/envs/py36/lib/python3.6/site-packages/astroid/node_classes.py in accept(self, visitor)
293     def accept(self, visitor):
294         func = getattr(visitor, "visit_" + self.__class__.__name__.lower())
--> 295         return func(self)
296
297     def get_children(self):

<ipython-input-13-243db1d8132c> in visit(self, node)
5     def visit(self, node):
6         for child in node.get_children():
----> 7             child.accept(self)
8     visit_module = visit
9     visit_assign = visit

~/anaconda3/envs/py36/lib/python3.6/site-packages/astroid/node_classes.py in accept(self, visitor)
293     def accept(self, visitor):
294         func = getattr(visitor, "visit_" + self.__class__.__name__.lower())
--> 295         return func(self)
296
297     def get_children(self):

<ipython-input-13-243db1d8132c> in visit_assignname(self, node)
14
15     def visit_assignname(self, node):
---> 16         for var in node.infer():
17             pass
18

~/anaconda3/envs/py36/lib/python3.6/site-packages/astroid/decorators.py in wrapped(node, context, _func, **kwargs)
83         try:
84             while True:
---> 85                 res = next(generator)
86                 # unproxy only true instance, not const, tuple, dict...
87                 if res.__class__.__name__ == 'Instance':

~/anaconda3/envs/py36/lib/python3.6/site-packages/astroid/bases.py in _infer_stmts(stmts, context, frame)
93         context.lookupname = stmt._infer_name(frame, name)
94         try:
---> 95             for inferred in stmt.infer(context=context):
96                 yield inferred
97                 inferred = True

~/anaconda3/envs/py36/lib/python3.6/site-packages/astroid/context.py in cache_generator(self, key, generator)
38     def cache_generator(self, key, generator):
39         results = []
---> 40         for result in generator:
41             results.append(result)
42             yield result

~/anaconda3/envs/py36/lib/python3.6/site-packages/astroid/decorators.py in yes_if_nothing_inferred(func, instance, args, kwargs)
106 def yes_if_nothing_inferred(func, instance, args, kwargs):
107     inferred = False
--> 108     for node in func(*args, **kwargs):
109         inferred = True
110         yield node

~/anaconda3/envs/py36/lib/python3.6/site-packages/astroid/decorators.py in wrapped(node, context, _func, **kwargs)
83         try:
84             while True:
---> 85                 res = next(generator)
86                 # unproxy only true instance, not const, tuple, dict...
87                 if res.__class__.__name__ == 'Instance':

~/anaconda3/envs/py36/lib/python3.6/site-packages/astroid/inference.py in _filter_operation_errors(self, infer_callable, context, error)
407
408 def _filter_operation_errors(self, infer_callable, context, error):
--> 409     for result in infer_callable(self, context):
410         if isinstance(result, error):
411             # For the sake of .infer(), we don't care about operation

~/anaconda3/envs/py36/lib/python3.6/site-packages/astroid/inference.py in _infer_binop(self, context)
686             try:
687                 for result in _infer_binary_operation(lhs, rhs, self,
--> 688                                                       context, _get_binop_flow):
689                     yield result
690             except exceptions._NonDeducibleTypeHierarchy:

~/anaconda3/envs/py36/lib/python3.6/site-packages/astroid/inference.py in _infer_binary_operation(left, right, binary_opnode, context, flow_factory)
626     for method in methods:
627         try:
--> 628             results = list(method())
629         except AttributeError:
630             continue

~/anaconda3/envs/py36/lib/python3.6/site-packages/astroid/decorators.py in yes_if_nothing_inferred(func, instance, args, kwargs)
106 def yes_if_nothing_inferred(func, instance, args, kwargs):
107     inferred = False
--> 108     for node in func(*args, **kwargs):
109         inferred = True
110         yield node

~/anaconda3/envs/py36/lib/python3.6/site-packages/astroid/protocols.py in tl_infer_binary_op(self, opnode, operator, other, context, method)
170             yield not_implemented
171             return
--> 172         yield _multiply_seq_by_int(self, opnode, other, context)
173     elif isinstance(other, bases.Instance) and operator == '*':
174         # Verify if the instance supports __index__.

~/anaconda3/envs/py36/lib/python3.6/site-packages/astroid/protocols.py in _multiply_seq_by_int(self, opnode, other, context)
137     elts = []
138     for elt in self.elts:
--> 139         infered = helpers.safe_infer(elt, context)
140         if infered is None:
141             infered = util.Uninferable

~/anaconda3/envs/py36/lib/python3.6/site-packages/astroid/helpers.py in safe_infer(node, context)
98     try:
99         inferit = node.infer(context=context)
--> 100         value = next(inferit)
101     except exceptions.InferenceError:
102         return

TypeError: 'Uninferable' object is not an iterator

# Fixed code
def _multiply_seq_by_int(self, opnode, other, context):
    node = self.__class__(parent=opnode)
    elts = []
    filtered_elts = (elt for elt in self.elts if elt is not util.Uninferable)
    for elt in filtered_elts:
        infered = helpers.safe_infer(elt, context)
        if infered is None:
            infered = util.Uninferable
        elts.append(infered)
    node.elts = elts * other.value
    return node