类型'generator'的Nuitka TypeError编译器错误对象没有len()

时间:2018-09-11 14:42:24

标签: python python-3.x compiler-errors scons nuitka

使用Nuitka(nuitka --standalone file.py)进行编译时,出现以下类型错误:

Traceback (most recent call last):
  File "C:\Users\Tearzz\AppData\Local\Programs\Python\Python36\lib\site-packages\nuitka\build\inline_copy\bin\..\lib\scons-3.0.1\SCons\Taskmaster.py", line 241, in execute
    if not t.retrieve_from_cache():
  File "C:\Users\Tearzz\AppData\Local\Programs\Python\Python36\lib\site-packages\nuitka\build\inline_copy\bin\..\lib\scons-3.0.1\SCons\Node\FS.py", line 2925, in retrieve_from_cache
    return self.get_build_env().get_CacheDir().retrieve(self)
  File "C:\Users\Tearzz\AppData\Local\Programs\Python\Python36\lib\site-packages\nuitka\build\inline_copy\bin\..\lib\scons-3.0.1\SCons\Environment.py", line 1016, in get_CacheDir
    cd = SCons.CacheDir.CacheDir(path)
  File "C:\Users\Tearzz\AppData\Local\Programs\Python\Python36\lib\site-packages\nuitka\build\inline_copy\bin\..\lib\scons-3.0.1\SCons\CacheDir.py", line 163, in __init__
    if os.path.isdir(path) and len(f for f in os.listdir(path) if os.path.basename(f) != "config") != 0:
TypeError: object of type 'generator' has no len()

我已经重新安装了Nuitka,并且pip成功安装了Scons。但是我一直在编译时收到此错误。我不确定发生了什么,也无法在其他地方找到问题的答案。

0 个答案:

没有答案