Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running on windows #5

Open
mariammsaleh opened this issue Jul 27, 2020 · 2 comments
Open

Error when running on windows #5

mariammsaleh opened this issue Jul 27, 2020 · 2 comments

Comments

@mariammsaleh
Copy link

I am running this code on Windows, I keep getting this error:
AttributeError: 'Archive' object has no attribute 'set_compression_level'

So, other than changing the path, are there any changes that need to be done for the code to work?

@tushar-nitave
Copy link

Can you please more details? Which file or which line?

@mariammsaleh
Copy link
Author

I am using the same example that was listed in the read me with modification for Windows navigation:

from librar import archive
import inspect, os

base=os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))

a=archive.Archive("testarchive1.rar",base)
a = archive.Archive("\tmp\testarchive1.rar",base) # archive will be created in /tmp
a.set_password("awesomesauce") # set password to the archive
a.set_compression_level(0) # change compression level to Store
a.set_recovery_record(5) # set recovery record to 5%
a.set_volume_size("50k") # split archive based on volume size 50 kilobytes
a.run()

Howver, I get the following error:


AttributeError Traceback (most recent call last)
in
7 a=archive.Archive("testarchive1.rar",base)
8 a = archive.Archive("\tmp\testarchive1.rar",base) # archive will be created in /tmp
----> 9 a.set_password("awesomesauce") # set password to the archive
10 a.set_compression_level(0) # change compression level to Store
11 a.set_recovery_record(5) # set recovery record to 5%

AttributeError: 'Archive' object has no attribute 'set_password'

I don't know what I am doing wrong!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants