我正在尝试使用with tempfile.TemporaryDirectory() as directory:
创建一个临时目录
我已导入临时文件
当我运行程序时,我得到错误:
Traceback (most recent call last):
File "batch.py", line 79, in <module>
with tempfile.TemporaryDirectory() as directory:
AttributeError: 'module' object has no attribute 'TemporaryDirectory'
我正在运行python 3.8
如果使用调试器运行,程序将成功运行,但如果在不使用调试器的情况下运行,则会出现此错误
目前没有回答
相关问题 更多 >
编程相关推荐