我正在尝试使用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
如果使用调试器运行该程序将成功运行,但是如果我在没有调试器的情况下运行该程序,则会收到此错误。