cb109 / pyplantuml

:sunflower: Creates UML diagrams from python source code.
44 stars 10 forks source link

Doesn't work on any version of python 3.7 onward #3

Open IllustratedMan-code opened 2 years ago

IllustratedMan-code commented 2 years ago

Here is the traceback for 3.7:

Traceback (most recent call last):
  File "/nix/store/d5mbihznhwn25vnx5y2vnc56bsx1pg0v-python3-3.7.12-env/lib/python3.7/site-packages/astroid/manager.py", line 43, in astroid_wrapper
    return func(modname)
  File "/nix/store/d5mbihznhwn25vnx5y2vnc56bsx1pg0v-python3-3.7.12-env/lib/python3.7/site-packages/astroid/manager.py", line 111, in ast_from_file
    return AstroidBuilder(self).file_build(filepath, modname)
  File "/nix/store/d5mbihznhwn25vnx5y2vnc56bsx1pg0v-python3-3.7.12-env/lib/python3.7/site-packages/astroid/builder.py", line 134, in file_build
    module = self._data_build(data, modname, path)
  File "/nix/store/d5mbihznhwn25vnx5y2vnc56bsx1pg0v-python3-3.7.12-env/lib/python3.7/site-packages/astroid/builder.py", line 177, in _data_build
    module = rebuilder.visit_module(node, modname, node_file, package)
  File "/nix/store/d5mbihznhwn25vnx5y2vnc56bsx1pg0v-python3-3.7.12-env/lib/python3.7/site-packages/astroid/rebuilder.py", line 146, in visit_module
    newnode.body = [self.visit(child, newnode) for child in node.body]
  File "/nix/store/d5mbihznhwn25vnx5y2vnc56bsx1pg0v-python3-3.7.12-env/lib/python3.7/site-packages/astroid/rebuilder.py", line 146, in <listcomp>
    newnode.body = [self.visit(child, newnode) for child in node.body]
  File "/nix/store/d5mbihznhwn25vnx5y2vnc56bsx1pg0v-python3-3.7.12-env/lib/python3.7/site-packages/astroid/rebuilder.py", line 159, in visit
    return self._transform(visit_method(node, parent))
  File "/nix/store/d5mbihznhwn25vnx5y2vnc56bsx1pg0v-python3-3.7.12-env/lib/python3.7/site-packages/astroid/rebuilder.py", line 482, in visit_function
    newnode.body = [self.visit(child, newnode) for child in node.body]
  File "/nix/store/d5mbihznhwn25vnx5y2vnc56bsx1pg0v-python3-3.7.12-env/lib/python3.7/site-packages/astroid/rebuilder.py", line 482, in <listcomp>
    newnode.body = [self.visit(child, newnode) for child in node.body]
  File "/nix/store/d5mbihznhwn25vnx5y2vnc56bsx1pg0v-python3-3.7.12-env/lib/python3.7/site-packages/astroid/rebuilder.py", line 159, in visit
    return self._transform(visit_method(node, parent))
  File "/nix/store/d5mbihznhwn25vnx5y2vnc56bsx1pg0v-python3-3.7.12-env/lib/python3.7/site-packages/astroid/rebuilder.py", line 407, in visit_discard
    newnode.value = self.visit(node.value, newnode)
  File "/nix/store/d5mbihznhwn25vnx5y2vnc56bsx1pg0v-python3-3.7.12-env/lib/python3.7/site-packages/astroid/rebuilder.py", line 159, in visit
    return self._transform(visit_method(node, parent))
  File "/nix/store/d5mbihznhwn25vnx5y2vnc56bsx1pg0v-python3-3.7.12-env/lib/python3.7/site-packages/astroid/rebuilder.py", line 311, in visit_callfunc
    if node.starargs is not None:
AttributeError: 'Call' object has no attribute 'starargs'

Here is the trace from 3.8 onwards:

Traceback (most recent call last):
  File "/nix/store/sl6rynqrm59l8jz5bj64wihs53kvi265-python3.8-pyplantuml-0.1.51/bin/.pyplantuml-wrapped", line 6, in <module>
    from pyplantuml.cli import convert_local
  File "/nix/store/4kc8dfhcj3146y83qz37q8p5d4in0dcy-python3-3.8.12-env/lib/python3.8/site-packages/pyplantuml/cli.py", line 4, in <module>
    from pyplantuml import adapter
  File "/nix/store/4kc8dfhcj3146y83qz37q8p5d4in0dcy-python3-3.8.12-env/lib/python3.8/site-packages/pyplantuml/adapter.py", line 6, in <module>
    from astroid.manager import AstroidManager
  File "/nix/store/4kc8dfhcj3146y83qz37q8p5d4in0dcy-python3-3.8.12-env/lib/python3.8/site-packages/astroid/__init__.py", line 131, in <module>
    __import__(module[:-3])
  File "/nix/store/4kc8dfhcj3146y83qz37q8p5d4in0dcy-python3-3.8.12-env/lib/python3.8/site-packages/astroid/brain/py2pytest.py", line 4, in <module>
    from astroid.builder import AstroidBuilder
  File "/nix/store/4kc8dfhcj3146y83qz37q8p5d4in0dcy-python3-3.8.12-env/lib/python3.8/site-packages/astroid/builder.py", line 32, in <module>
    from astroid.rebuilder import TreeRebuilder
  File "/nix/store/4kc8dfhcj3146y83qz37q8p5d4in0dcy-python3-3.8.12-env/lib/python3.8/site-packages/astroid/rebuilder.py", line 23, in <module>
    from _ast import (
ImportError: cannot import name 'Str' from '_ast' (unknown location)
emirkmo commented 2 years ago

Confirming latest python 3.10.4 and 3.10.5 same error still as 3.8+

AntiLibrary5 commented 1 year ago

Same with python 3.8