ppt_presenter icon indicating copy to clipboard operation
ppt_presenter copied to clipboard

AttributeError: 'module' object has no attribute 'TemporaryDirectory'

Open PatelBassar opened this issue 4 years ago • 4 comments

I am getting Error as below. AttributeError: 'module' object has no attribute 'TemporaryDirectory'

PatelBassar avatar Apr 12 '20 19:04 PatelBassar

What's the full traceback?

chaonan99 avatar Apr 12 '20 20:04 chaonan99

Traceback (most recent call last): File "ppt_presenter.py", line 71, in main() File "ppt_presenter.py", line 67, in main ppt_presenter(args.pptx, args.pdf, args.output) File "ppt_presenter.py", line 24, in ppt_presenter with tempfile.TemporaryDirectory() as temp_path: AttributeError: 'module' object has no attribute 'TemporaryDirectory'

PatelBassar avatar Apr 13 '20 06:04 PatelBassar

Looks like you are using python 2. You can try to change TemporaryDirectory to tempdir: https://docs.python.org/2/library/tempfile.html

chaonan99 avatar Apr 13 '20 15:04 chaonan99

Traceback (most recent call last): File "ppt_presenter.py", line 71, in main() File "ppt_presenter.py", line 67, in main ppt_presenter(args.pptx, args.pdf, args.output) File "ppt_presenter.py", line 24, in ppt_presenter with tempfile.tempdir() as temp_path: TypeError: 'NoneType' object is not callable

PatelBassar avatar Apr 13 '20 16:04 PatelBassar