【问题标题】:RuntimeError when run my python code运行我的python代码时出现RuntimeError
【发布时间】:2017-11-03 14:24:14
【问题描述】:

我尝试运行我的代码,但遇到了这个错误:

File "", line 1, in 
runfile('C:/Users/niloo/PycharmProjects/untitled/MADRL-master/runners/run_multiwalker.py', wdir='C:/Users/niloo/PycharmProjects/untitled/MADRL-master/runners')

File "C:\Users\niloo\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile
execfile(filename, namespace)

File "C:\Users\niloo\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 101, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/niloo/PycharmProjects/untitled/MADRL-master/runners/run_multiwalker.py", line 7, in 
from runners import RunnerParser

File "", line 961, in _find_and_load

File "", line 946, in _find_and_load_unlocked

File "", line 881, in _find_spec

File "", line 855, in _find_spec_legacy

File "C:\Users\niloo\Anaconda3\lib\site-packages\pyximport\pyximport.py", line 253, in find_module
fp, pathname, (ext,mode,ty) = imp.find_module(fullname,package_path)

File "C:\Users\niloo\Anaconda3\lib\imp.py", line 269, in find_module
raise RuntimeError("'path' must be None or a list, "

RuntimeError: 'path' must be None or a list, not <class '_frozen_importlib_external._NamespacePath'>

我该怎么办?

【问题讨论】:

  • 请将您的整个代码发布在这里 niloofar。
  • 我的代码有几个文件。这是我的代码的链接:github.com/sisl/MADRL

标签: python django anaconda


【解决方案1】:

您需要为“路径”提供 None 或错误中描述的列表。

【讨论】:

  • 我该怎么做?
  • 是哪个文件?你也可以看看这个:MCVE
  • runner>run_multiwalker.py
猜你喜欢
  • 1970-01-01
  • 2021-06-01
  • 2019-08-18
  • 1970-01-01
  • 2020-08-15
  • 1970-01-01
  • 2018-01-24
  • 2014-05-13
  • 2017-08-19
相关资源
最近更新 更多