I
I
Ivan Noname2018-04-02 08:32:10
Python
Ivan Noname, 2018-04-02 08:32:10

How to overcome the error in Python 3?

I use the SnowBoy library for keyword recognition
OS - Linux Mint
If I run demo.py through the second version of python, everything works fine
Through the third branch of python, it gives an error

Traceback (most recent call last):
  File "/home/computer/snowboy/demo.py", line 1, in <module>
    import snowboydecoder
  File "/home/computer/snowboy/snowboydecoder.py", line 5, in <module>
    import snowboydetect
  File "/home/computer/snowboy/snowboydetect.py", line 28, in <module>
    _snowboydetect = swig_import_helper()
  File "/home/computer/snowboy/snowboydetect.py", line 24, in swig_import_helper
    _mod = imp.load_module('_snowboydetect', fp, pathname, description)
  File "/usr/lib/python3.5/imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: dynamic module does not define module export function (PyInit__snowboydetect)

How to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2018-04-02
@wbsr

Because the snowboydetect library is not suitable for version 3. More precisely, there are used code constructs that stopped working in version 3.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question