devopshq / artifactory

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

Copy fails with AttributeError: 'str' object has no attribute 'drive' #448

Closed pchambre closed 5 months ago

pchambre commented 5 months ago

I am trying to copy some folders/files from one repo to another.

I have tried this with both Python 3.11 and 3.8. Running dohq-artifactory 0.10.0.

Full error is: Traceback (most recent call last): File "", line 5, in File "/usr/local/anaconda3/lib/python3.11/site-packages/artifactory.py", line 2151, in copy if self.drive.rstrip("/") == dst.drive.rstrip("/"): ^^^^^^^^^ AttributeError: 'str' object has no attribute 'drive'

The copy piece of things looks like this:

for p in path.glob("**/{0}".format(fishlibVersion)): print(p) for q in p: print(q) q.copy(target)

If I just want to print stuff, it's fine.

Is there something I need to do to install a newer version of artifactory.py? Or am I using copy incorrectly?

Thanks, Paul

pchambre commented 5 months ago

Never mind. I was being stupid and hadn't created another path for target. Was just using a URL String...