bblfsh / python-driver

GNU General Public License v3.0
10 stars 16 forks source link

TypeError: 'str' object does not support item assignment #177

Closed smacker closed 5 years ago

smacker commented 5 years ago

Running gemini I got this error:

FATAL exago/exago.py: driver failure: Traceback (most recent call last):
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/requestprocessor.py", line 155, in process_request
    ast = AstImprover(code, orig_ast).parse()
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 38, in parse
    res = self.visit(self._astdict, root=True)
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 65, in visit
    visit_result = meth(node)
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 248, in visit_other
    node[field] = meth(child)
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 255, in visit_other_field
    return [self.visit(x) for x in node]
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 255, in <listcomp>
    return [self.visit(x) for x in node]
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 65, in visit
    visit_result = meth(node)
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 248, in visit_other
    node[field] = meth(child)
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 255, in visit_other_field
    return [self.visit(x) for x in node]
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 255, in <listcomp>
    return [self.visit(x) for x in node]
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 65, in visit
    visit_result = meth(node)
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 248, in visit_other
    node[field] = meth(child)
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 253, in visit_other_field
    return self.visit(node)
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 65, in visit
    visit_result = meth(node)
  File "/opt/driver/bin/.local/lib/python3.6/site-packages/python_driver/astimprove.py", line 221, in visit_arguments
    kwarg["ast_type"] = "kwarg"
TypeError: 'str' object does not support item assignment

I'm not sure if I'm allowed to share the file (most probably not). //cc @smola

Update: I grep'ed logs and there are quite many such errors.

juanjux commented 5 years ago

@smacker Send me the file via Slack and I'll take a look.