audeering / audb

Manage audio and video databases
https://audeering.github.io/audb/
Other
23 stars 1 forks source link

There are no available db in audb #254

Closed Seohyeoniii closed 8 months ago

Seohyeoniii commented 1 year ago

screenshot1

db = audb.load(
    'emodb',
    version='1.3.0',
    verbose=False,
)

when i try to load emodb with this code, the error below occur.

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
File ~/w2v2-how-to/venv/lib/python3.10/site-packages/audb/core/api.py:267, in dependencies(name, version, cache_root, verbose)
    266 try:
--> 267     deps.load(deps_path)
    268 except (AttributeError, FileNotFoundError, ValueError, EOFError):
    269     # If loading pickled cached file fails, load again from backend

File ~/w2v2-how-to/venv/lib/python3.10/site-packages/audb/core/dependencies.py:276, in Dependencies.load(self, path)
    275 if not os.path.exists(path):
--> 276     raise FileNotFoundError(
    277         errno.ENOENT,
    278         os.strerror(errno.ENOENT),
    279         path,
    280     )
    281 if extension == 'pkl':

FileNotFoundError: [Errno 2] No such file or directory: '/Users/username/audb/emodb/1.3.0/db.pkl'

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
Cell In[17], line 16
      2 import audformat
      5 # db = audb.load(
      6 #     'emodb',
      7 #     version='1.3.0',
   (...)
     13 #     verbose=False,
     14 # )
---> 16 db = audb.load(
     17     'emodb',
     18     version='1.3.0',
     19     verbose=False,
     20 )
     21 # speaker = db['files']['speaker'].get()
     22 # emotion = db['emotion']['emotion'].get()
     23 
     24 # audformat.utils.concat([emotion, speaker])

File ~/w2v2-how-to/venv/lib/python3.10/site-packages/audb/core/load.py:852, in load(name, version, only_metadata, bit_depth, channels, format, mixdown, sampling_rate, tables, media, removed_media, full_path, cache_root, num_workers, timeout, verbose)
    849     print(f'Get:   {name} v{version}')
    850     print(f'Cache: {db_root}')
--> 852 deps = dependencies(
    853     name,
    854     version=version,
    855     cache_root=cache_root,
    856     verbose=verbose,
    857 )
    859 try:
    860     with FolderLock(db_root, timeout=timeout):
    861 
    862         # Start with database header without tables

File ~/w2v2-how-to/venv/lib/python3.10/site-packages/audb/core/api.py:270, in dependencies(name, version, cache_root, verbose)
    267     deps.load(deps_path)
    268 except (AttributeError, FileNotFoundError, ValueError, EOFError):
    269     # If loading pickled cached file fails, load again from backend
--> 270     backend = lookup_backend(name, version)
    271     with tempfile.TemporaryDirectory() as tmp_root:
    272         archive = backend.join(name, define.DB)

File ~/w2v2-how-to/venv/lib/python3.10/site-packages/audb/core/utils.py:36, in lookup_backend(name, version)
     13 def lookup_backend(
     14         name: str,
     15         version: str,
     16 ) -> audbackend.Backend:
     17     r"""Return backend of requested database.
     18 
     19     If the database is stored in several repositories,
   (...)
     34 
     35     """
---> 36     return _lookup(name, version)[1]

File ~/w2v2-how-to/venv/lib/python3.10/site-packages/audb/core/utils.py:69, in _lookup(name, version)
     62     backend = audbackend.create(
     63         repository.backend,
     64         repository.host,
     65         repository.name,
     66     )
     67     header = backend.join(name, 'db.yaml')
---> 69     if backend.exists(header, version):
     70         return repository, backend
     72 raise RuntimeError(
     73     'Cannot find version '
     74     f'{version} '
     75     f'for database '
     76     f"'{name}'."
     77 )

File ~/w2v2-how-to/venv/lib/python3.10/site-packages/audbackend/core/backend.py:94, in Backend.exists(self, path, version, ext)
     82 r"""Check if file exists on backend.
     83 
     84 Args:
   (...)
     91 
     92 """
     93 path = self.path(path, version, ext=ext)
---> 94 return self._exists(path)

File ~/w2v2-how-to/venv/lib/python3.10/site-packages/audbackend/core/artifactory.py:61, in Artifactory._exists(self, path)
     55 r"""Check if file exists on backend."""
     56 try:
     57     # Can lead to
     58     # RuntimeError: 404 page not found
     59     # or
     60     # requests.exceptions.HTTPError: 403 Client Error
---> 61     return audfactory.path(path).exists()
     62 except self._non_existing_path_error:  # pragma: nocover
     63     return False

File /opt/homebrew/Cellar/python@3.10/3.10.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/pathlib.py:1290, in Path.exists(self)
   1286 """
   1287 Whether this path exists.
   1288 """
   1289 try:
-> 1290     self.stat()
   1291 except OSError as e:
   1292     if not _ignore_error(e):

File ~/w2v2-how-to/venv/lib/python3.10/site-packages/artifactory.py:1413, in ArtifactoryPath.stat(self, pathobj)
   1393 """
   1394 Request remote file/directory status info
   1395 Returns an object of class ArtifactoryFileStat.
   (...)
   1410   children -- list of children names
   1411 """
   1412 pathobj = pathobj or self
-> 1413 return self._accessor.stat(pathobj=pathobj)

TypeError: stat() missing required argument 'path' (pos 1)
hagenw commented 1 year ago

Thanks for reporting. This strange error is also reported in https://github.com/audeering/audb/issues/240 and https://github.com/audeering/audb/pull/239, see also the failed CI job at https://github.com/audeering/audb/actions/runs/3765104243/jobs/6400231551.

We have an idea what might be the underlying issue, but we haven't solved it yet.

As a workaround you could use Python 3.8 or 3.9.

hagenw commented 1 year ago

We have now released audb 1.4.2 which should solve this issue under Python 3.10. Could you try to run

$ pip install --upgrade audb

and rerun your command again?