I get this error when I try to set a password to a zip file. Below is the code/error I get. Please give me an example of the correct way to do it.
- This is just the password part of the script... the entire script is to long to post.
Code:
password = "dog"
password = zipfile.setpassword(pwd)
Error received when hitting the password part of the script.
-------------------------------------------
Traceback (most recent call last):
File "C:\Users\Owner\Desktop\ZIP-IT\ZIP IT.py", line 86, in <module>
start()
File "C:\Users\Owner\Desktop\ZIP-IT\ZIP IT.py", line 54, in start
compress()
File "C:\Users\Owner\Desktop\ZIP-IT\ZIP IT.py", line 70, in compress
password = zipfile.setpassword(pwd)
AttributeError: 'module' object has no attribute 'setpassword'