Skip to content

module 'collections' has no attribute 'abc' #2

@louwers

Description

@louwers
Error detected while processing /home/bart/dotfiles/vim/.vim/plugged/vim-sort-folds/autoload/sortfolds.vim:
line    7:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/bart/.vim/plugged/vim-sort-folds/python3/sort_folds/__init__.py", line 3, in <module>
    from sort_folds import fold
  File "/home/bart/.vim/plugged/vim-sort-folds/python3/sort_folds/fold.py", line 6, in <module>
    class VimFold(collections.abc.Sequence):
  File "/usr/lib/python3.8/collections/__init__.py", line 55, in __getattr__
    raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
AttributeError: module 'collections' has no attribute 'abc'
Error detected while processing function sortfolds#SortFolds:
line    1:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'sort_folds' is not defined

You want to use:

import collections.abc

Not

import collections

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions