我不明白为什么我在以下行中得到递归深度错误
source = zipfile.ZipFile( "E:\\Zip Files\\80348.zip' , 'r' )
source.extractall()
该文件存在,我可以打开它。我得到的Traceback就是那个
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python26\lib\zipfile.py", line 940, in extractall
self.extract(zipinfo, path, pwd)
File "C:\Python26\lib\zipfile.py", line 928, in extract
return self._extract_member(member, path, pwd)
File "C:\Python26\lib\zipfile.py", line 961, in _extract_member
if upperdirs and not os.path.exists(upperdirs):
File "C:\Python26\lib\genericpath.py", line 18, in exists
st = os.path.exists(path)
File "C:\Python26\lib\genericpath.py", line 18, in exists
st = os.path.exists(path)
你能说出这里出了什么问题......
编辑: -
嘿,我刚刚发现这不是来自zipfile的错误 ....我运行任何其他python程序我得到同样的错误....
当我在命令行输入python时,我收到错误
Exception RuntimeError: 'maximum recursion depth exceeded in __subclasscheck__'
in <type 'exceptions.RuntimeError'> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python
object' in <type 'exceptions.RuntimeError'> ignored
'import site' failed; use -v for traceback
我认为错误与zipfile无关,因为我也看到了这个链接...... import site error
我尝试使用-v并获得以下追溯
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# C:\Python26\lib\site.pyc matches C:\Python26\lib\site.py
import site # precompiled from C:\Python26\lib\site.pyc
# C:\Python26\lib\os.pyc matches C:\Python26\lib\os.py
import os # precompiled from C:\Python26\lib\os.pyc
import errno # builtin
import nt # builtin
# C:\Python26\lib\ntpath.pyc matches C:\Python26\lib\ntpath.py
import ntpath # precompiled from C:\Python26\lib\ntpath.pyc
# C:\Python26\lib\stat.pyc matches C:\Python26\lib\stat.py
import stat # precompiled from C:\Python26\lib\stat.pyc
# C:\Python26\lib\genericpath.pyc matches C:\Python26\lib\genericpath.py
import genericpath # precompiled from C:\Python26\lib\genericpath.pyc
# C:\Python26\lib\warnings.pyc matches C:\Python26\lib\warnings.py
import warnings # precompiled from C:\Python26\lib\warnings.pyc
# C:\Python26\lib\linecache.pyc matches C:\Python26\lib\linecache.py
import linecache # precompiled from C:\Python26\lib\linecache.pyc
# C:\Python26\lib\types.pyc matches C:\Python26\lib\types.py
import types # precompiled from C:\Python26\lib\types.pyc
# C:\Python26\lib\UserDict.pyc matches C:\Python26\lib\UserDict.py
import UserDict # precompiled from C:\Python26\lib\UserDict.pyc
# C:\Python26\lib\_abcoll.pyc matches C:\Python26\lib\_abcoll.py
import _abcoll # precompiled from C:\Python26\lib\_abcoll.pyc
# C:\Python26\lib\abc.pyc matches C:\Python26\lib\abc.py
import abc # precompiled from C:\Python26\lib\abc.pyc
# C:\Python26\lib\copy_reg.pyc matches C:\Python26\lib\copy_reg.py
import copy_reg # precompiled from C:\Python26\lib\copy_reg.pyc
Exception RuntimeError: 'maximum recursion depth exceeded in __subclasscheck__'
in <type 'exceptions.RuntimeError'> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python
object' in <type 'exceptions.RuntimeError'> ignored
'import site' failed; traceback:
Traceback (most recent call last):
File "C:\Python26\Lib\site.py", line 513, in <module>
main()
File "C:\Python26\Lib\site.py", line 496, in main
known_paths = addsitepackages(known_paths)
File "C:\Python26\Lib\site.py", line 288, in addsitepackages
addsitedir(sitedir, known_paths)
File "C:\Python26\Lib\site.py", line 185, in addsitedir
addpackage(sitedir, name, known_paths)
File "C:\Python26\Lib\site.py", line 159, in addpackage
if not dircase in known_paths and os.path.exists(dir):
File "C:\Python26\lib\genericpath.py", line 18, in exists
st = os.path.exists(path)
我应该怎么做......有没有人遇到同样的问题?