ImportError: Ошибка загрузки DLL: указанный модуль 'TestClass' не найден - PullRequest
0 голосов
/ 15 апреля 2019

Я искал несколько других вопросов, но их ответы не помогли или я не смог правильно их реализовать.Из них этот вопрос почти такой же, как и я, я думаю.

Структура моего каталога следующая:

DashboardV3
   TestClass.py

   doc
      source
         index.rst
         conf.py

Я хочу документироватьследующий класс TestClass.py:

import pandas as pd
import numpy as np
from numba import jit

class MyClass:
    def preprocess_dataframe(path):
        df = pd.read_csv(path)

        return df

Я включил следующую настройку пути в conf.py:

import os
import sys
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('./'))
print(sys.path)

Index.rst определение следующее:

Welcome!
=========================================

.. automodule:: testClass.MyClass
    :members:

.. toctree::
   :maxdepth: 2
   :caption: Contents:

Тем не менее, я получаю следующую ошибку при запуске make html:

ImportError: DLL load failed: The specified module could not be found

, который является частью общего журнала печати:

Running Sphinx v1.8.5
loading translations [de]... done
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: [] 0 added, 1 changed, 0 removed
reading sources... [100%] index
WARNING: autodoc: failed to import module 'TestClass'; the following exception was raised:
DLL load failed: The specified module not be found
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
generating indices... genindex py-modindex
writing additional pages... search
copying static files... done
copying extra files... done
dumping search index in German (code: de) ... done
dumping object inventory... done
build succeeded.

The HTML pages are in build\html.

Просто чтобы быть ясным: я пытался реализовать несколько решений из всех других вопросов, заданных заранее, и я спрашиваю, потому что я, вероятно, не смог включить правильные ответы.

Я кодирую в VS Code, если этоиз интереса.

Большое спасибо за помощь!

...