Giter Site home page Giter Site logo

Comments (3)

pixelneo avatar pixelneo commented on May 31, 2024

Hello, you can start by removing this try/except.

It will fail and show you the whole traceback.

from vim-python-docstring.

gcaria avatar gcaria commented on May 31, 2024

Sorry for the slow reply, this is what I get with the full traceback:

Error detected while processing function vimpythondocstring#Full:
line    1:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ubuntu/.vim/bundle/vim-python-docstring/autoload/../python/pydocstring.py", line 265, in full_docstring
    self.obj_controller.write_docstring(print_hints=print_hints)
  File "/home/ubuntu/.vim/bundle/vim-python-docstring/autoload/../python/pydocstring.py", line 210, in write_docstring
    args, returns, yields, raises = self._process_tree(tree)
  File "/home/ubuntu/.vim/bundle/vim-python-docstring/autoload/../python/pydocstring.py", line 202, in _process_tree
    v.visit(tree)
  File "/usr/lib/python3.8/ast.py", line 371, in visit
    return visitor(node)
  File "/usr/lib/python3.8/ast.py", line 379, in generic_visit
    self.visit(item)
  File "/usr/lib/python3.8/ast.py", line 371, in visit
    return visitor(node)
  File "/home/ubuntu/.vim/bundle/vim-python-docstring/autoload/../python/asthelper.py", line 113, in visit_FunctionDef
    self._handle_functions(node)
  File "/home/ubuntu/.vim/bundle/vim-python-docstring/autoload/../python/asthelper.py", line 88, in _handle_functions
    type_hint = ast.unparse(arg.annotation)
AttributeError: module 'ast' has no attribute 'unparse'

Since this is calling python3.8 I think there is a mismatch with the python version vim calls and the python version I normally use.

from vim-python-docstring.

pixelneo avatar pixelneo commented on May 31, 2024

Honestly, I don't know, it seems to me like an issue with the ast module. I suggest trying it out with different python version (3.9.13).

from vim-python-docstring.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.