When requesting a non existing path on a server it might fail differently for different user with different access rights:
import os
import audfactory
path = audfactory.path('https://artifactory.audeering.com/artifactory/data-private-local/crema-d/db')
versions = [os.path.basename(str(p)) for p in path if p.is_dir]
fails for me with
FileNotFoundError: [Errno 2] No such file or directory: 'https://artifactory.audeering.com/artifactory/api/storage/data-private-local/crema-d/db'
whereas for another user it failed with
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://artifactory.audeering.com/artifactory/api/storage/data-private-local/crema-d/db
This means we also have to catch the 403 error in audfactory.versions().
When requesting a non existing path on a server it might fail differently for different user with different access rights:
fails for me with
whereas for another user it failed with
This means we also have to catch the 403 error in
audfactory.versions()
.