berkerpeksag / astor

Python AST read/write
https://pypi.org/project/astor/
BSD 3-Clause "New" or "Revised" License
810 stars 102 forks source link

'Call' object has no attribute 'starargs' error on python 3.5 #80

Closed stefanoborini closed 7 years ago

stefanoborini commented 7 years ago

I get the following backtrace using astor 0.5 on python 3.5

  File "/Users/sborini/Work/github/simphony/simphony-remote/venv/lib/python3.5/site-packages/traitlet_documenter/util.py", line 62, in get_trait_definition
    return astor.to_source(node.value).strip()
  File "/Users/sborini/Work/github/simphony/simphony-remote/venv/lib/python3.5/site-packages/astor/codegen.py", line 40, in to_source
    generator.visit(node)
  File "/Users/sborini/Work/github/simphony/simphony-remote/venv/lib/python3.5/site-packages/astor/misc.py", line 161, in visit
    return visitor(node)
  File "/Users/sborini/Work/github/simphony/simphony-remote/venv/lib/python3.5/site-packages/astor/codegen.py", line 366, in visit_Call
    self.conditional_write(write_comma, '*', node.starargs)
AttributeError: 'Call' object has no attribute 'starargs'
berkerpeksag commented 7 years ago

Thank you for the report. Do you have a reproducer so we can convert it to a test case?

stefanoborini commented 7 years ago

It seems it was already been fixed in master. Keeping for posterity.

Suor commented 7 years ago

Any plans to release it?