Skip to content

AttributeError: module 'vim' has no attribute 'find_module' (python 3.7) #33

Description

@sebastianst

Probably after upgrading my Arch Linux system to python 3.7, thesaurus_query stopped working. I get the following errors:

Error detected while processing /home/stammler/.vim/bundle/thesaurus_query.vim/autoload/thesaurus_query.vim:
line  214:
Traceback (most recent call last):
  File "<string>", line 9, in <module>
  File "/home/stammler/.vim/bundle/thesaurus_query.vim/autoload/thesaurus_query/thesaurus_query.py", line 17, in <module>
    from . import backends as tq_backends
  File "/home/stammler/.vim/bundle/thesaurus_query.vim/autoload/thesaurus_query/backends/__init__.py", line 10, in <module>
    from . import *
  File "/home/stammler/.vim/bundle/thesaurus_query.vim/autoload/thesaurus_query/backends/thesaurus_com_lookup.py", line 27, i
n <module>
    import pkg_resources
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3112, in <module>
    @_call_aside
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3096, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3140, in _initialize_master_working_set
    for dist in working_set
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3140, in <genexpr>
    for dist in working_set
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2647, in activate
    declare_namespace(pkg)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2184, in declare_namespace
    _handle_ns(packageName, path_item)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2101, in _handle_ns
    loader = importer.find_module(packageName)
AttributeError: module 'vim' has no attribute 'find_module'
Error detected while processing function thesaurus_query#Thesaurus_Query_Init:
line    1:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'tq_interface' is not defined
Error detected while processing function thesaurus_query#Thesaurus_Query_Lookup:
line   40:
Traceback (most recent call last):
  File "<string>", line 2, in <module>
NameError: name 'tq_framework' is not defined
line   44:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'tq_synonym_result' is not defined 

Up-to-date Arch Linux, python 3.7.0, vim 8.1
It seems that other projects have similar problems, e.g., python-mode/python-mode#937

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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