我正在学习python 2.7并尝试使用wget从URL下载文件。
我收到以下错误(这里是确切的输入和语法):
Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import wget
>>> wget.download('http://www.csun.edu/~rd436460/Labview/Lecture-Overview.pdf')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\wget.py", line 506, in download
(fd, tmpfile) = tempfile.mkstemp(".tmp", prefix=prefix, dir=".")
File "C:\Python27\lib\tempfile.py", line 314, in mkstemp
return _mkstemp_inner(dir, prefix, suffix, flags)
File "C:\Python27\lib\tempfile.py", line 257, in _mkstemp_inner
raise IOError, (_errno.EEXIST, "No usable temporary file name found")
IOError: [Errno 17] No usable temporary file name found
>>>
我的问题是.......正确的语法是什么才能让这个文件无错误地下载?
我在Windows 10上运行Python 2.7 ......此外,由于没有驱动器空间,我还看到了其他一些临时文件错误。在我的系统上,我有足够的驱动器空间。