devopshq / artifactory

dohq-artifactory: a Python client for Artifactory
https://devopshq.github.io/artifactory/
MIT License
273 stars 144 forks source link

AttributeError: 'ArtifactoryPath' object has no attribute 'archive' #329

Closed Gia-Vinh closed 2 years ago

Gia-Vinh commented 2 years ago

I try to use download a folder from artifactory and get this error: AttributeError: 'ArtifactoryPath' object has no attribute 'archive' My code is similar to this, with changes only in path, user, password.

from artifactory import ArtifactoryPath

path = ArtifactoryPath(
    "http://my_url:8080/artifactory/my_repo/winx64/aas", auth=("user", "password")
)

with path.archive(archive_type="zip", check_sum=False) as archive:
    with open(r"D:\target.zip", "wb") as out:
        out.write(archive.read())

# download folder archive in chunks
path.archive().writeto(out="my.zip", chunk_size=100 * 1024)

The folder can be downloaded as zip file using browser. So, I guess it's not due to server settings

beliaev-maksim commented 2 years ago

Do you use dohq-artifactory==0.8.0 ?

Gia-Vinh commented 2 years ago

Silly me. I'm using old version. Haha. Thank you anyway.