dvc icon indicating copy to clipboard operation
dvc copied to clipboard

dvc push to gcs giving error

Open adesgautam opened this issue 2 years ago • 5 comments

I am pushing some images to GCS using dvc remote add -f -d remote_storage gs://dvctmp/data && dvc add data/*.jpg && dvc push I am getting the following error:

ERROR: unexpected error - b/dvctmp/o

Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!

Using dvc doctor, getting

---------------------------------
Platform: Python 3.9.7 on macOS-10.16-x86_64-i386-64bit
Supports:
	gs (gcsfs = 2022.5.0),
	webhdfs (fsspec = 2022.5.0),
	http (aiohttp = 3.8.1, aiohttp-retry = 2.5.0),
	https (aiohttp = 3.8.1, aiohttp-retry = 2.5.0)
Cache types: reflink, hardlink, symlink
Cache directory: apfs on /dev/disk3s1s1
Caches: local
Remotes: gs
Workspace directory: apfs on /dev/disk3s1s1
Repo: dvc, git

Someone please help

adesgautam avatar Jun 29 '22 12:06 adesgautam

Hi @adesgautam , could you share the verbose output: dvc push -vv?

Also the DVC version is missing from dvc doctor output, could you share it?

daavoo avatar Jun 29 '22 12:06 daavoo

Here is the output from dvc push -vv

2022-06-29 18:18:30,326 TRACE: Namespace(cprofile=False, yappi=False, viztracer=False, viztracer_depth=None, cprofile_dump=None, pdb=False, instrument=False, instrument_open=False, quiet=0, verbose=2, version=None, cd='.', cmd='push', jobs=None, targets=[], remote=None, all_branches=False, all_tags=False, all_commits=False, with_deps=False, recursive=False, run_cache=False, glob=False, func=<class 'dvc.commands.data_sync.CmdDataPush'>, parser=DvcParser(prog='dvc', usage=None, description='Data Version Control', formatter_class=<class 'argparse.RawTextHelpFormatter'>, conflict_handler='error', add_help=False))
2022-06-29 18:18:30,462 TRACE:     1.14 ms in collecting stages from /Users/adeshgautam/Documents/MLOps/dvc-gs
2022-06-29 18:18:30,492 TRACE:    29.53 ms in collecting stages from /Users/adeshgautam/Documents/MLOps/dvc-gs/data
2022-06-29 18:18:30,631 DEBUG: Preparing to transfer data from '/Users/adeshgautam/Documents/MLOps/dvc-gs/.dvc/cache' to 'gs://dvctmp/data'
2022-06-29 18:18:30,631 DEBUG: Preparing to collect status from 'gs://dvctmp/data'
2022-06-29 18:18:30,631 DEBUG: Collecting status from 'gs://dvctmp/data'
2022-06-29 18:18:32,024 ERROR: unexpected error - b/dvctmp/o
------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/dvc/cli/__init__.py", line 185, in main
    ret = cmd.do_run()
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/dvc/cli/command.py", line 22, in do_run
    return self.run()
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/dvc/commands/data_sync.py", line 58, in run
    processed_files_count = self.repo.push(
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/dvc/repo/__init__.py", line 49, in wrapper
    return f(repo, *args, **kwargs)
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/dvc/repo/push.py", line 68, in push
    pushed += self.cloud.push(
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/dvc/data_cloud.py", line 109, in push
    return self.transfer(
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/dvc/data_cloud.py", line 88, in transfer
    return transfer(src_odb, dest_odb, objs, **kwargs)
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/dvc_data/transfer.py", line 159, in transfer
    status = compare_status(
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/dvc_data/status.py", line 179, in compare_status
    dest_exists, dest_missing = status(
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/dvc_data/status.py", line 151, in status
    odb.hashes_exist(hashes, jobs=jobs, progress=pbar.callback)
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/dvc_objects/db.py", line 413, in hashes_exist
    remote_size, remote_hashes = self._estimate_remote_size(
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/dvc_objects/db.py", line 285, in _estimate_remote_size
    remote_hashes = set(iter_with_pbar(hashes))
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/dvc_objects/db.py", line 273, in iter_with_pbar
    for hash_ in hashes:
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/dvc_objects/db.py", line 239, in _hashes_with_limit
    for hash_ in self._list_hashes(prefix):
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/dvc_objects/db.py", line 229, in _list_hashes
    for path in self._list_paths(prefix):
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/dvc_objects/db.py", line 213, in _list_paths
    yield from self.fs.find(self.fs.path.join(*parts), prefix=bool(prefix))
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/dvc_objects/fs/base.py", line 556, in find
    files = self.fs.find(with_prefix, prefix=self.path.parts(path)[-1])
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/fsspec/asyn.py", line 86, in wrapper
    return sync(self.loop, func, *args, **kwargs)
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/fsspec/asyn.py", line 66, in sync
    raise return_result
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/fsspec/asyn.py", line 26, in _runner
    result[0] = await coro
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/gcsfs/core.py", line 1085, in _find
    out, _ = await self._do_list_objects(
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/gcsfs/core.py", line 521, in _do_list_objects
    page = await self._call(
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/gcsfs/core.py", line 392, in _call
    status, headers, info, contents = await self._request(
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/decorator.py", line 221, in fun
    return await caller(func, *(extras + args), **kw)
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/gcsfs/retry.py", line 115, in retry_request
    return await func(*args, **kwargs)
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/gcsfs/core.py", line 384, in _request
    validate_response(status, contents, path, args)
  File "/opt/homebrew/Cellar/dvc/2.11.0/libexec/lib/python3.9/site-packages/gcsfs/retry.py", line 84, in validate_response
    raise FileNotFoundError(path)
FileNotFoundError: b/dvctmp/o
------------------------------------------------------------
2022-06-29 18:18:32,460 DEBUG: Removing '/Users/adeshgautam/Documents/MLOps/.kYA7fbwemfQQjbf3HNEeMX.tmp'
2022-06-29 18:18:32,460 DEBUG: Removing '/Users/adeshgautam/Documents/MLOps/.kYA7fbwemfQQjbf3HNEeMX.tmp'
2022-06-29 18:18:32,460 DEBUG: Removing '/Users/adeshgautam/Documents/MLOps/.kYA7fbwemfQQjbf3HNEeMX.tmp'
2022-06-29 18:18:32,461 DEBUG: Removing '/Users/adeshgautam/Documents/MLOps/dvc-gs/.dvc/cache/.jmKTuMpz8npG7WZuY5Ch5C.tmp'
2022-06-29 18:18:32,461 DEBUG: Version info for developers:
DVC version: 2.11.0 (brew)
---------------------------------
Platform: Python 3.9.13 on macOS-12.4-arm64-arm-64bit
Supports:
	azure (adlfs = 2022.4.0, knack = 0.9.0, azure-identity = 1.10.0),
	gdrive (pydrive2 = 1.10.1),
	gs (gcsfs = 2022.5.0),
	webhdfs (fsspec = 2022.5.0),
	http (aiohttp = 3.8.1, aiohttp-retry = 2.4.6),
	https (aiohttp = 3.8.1, aiohttp-retry = 2.4.6),
	s3 (s3fs = 2022.5.0, boto3 = 1.21.21),
	ssh (sshfs = 2022.6.0),
	oss (ossfs = 2021.8.0),
	webdav (webdav4 = 0.9.7),
	webdavs (webdav4 = 0.9.7)
Cache types: reflink, hardlink, symlink
Cache directory: apfs on /dev/disk3s1s1
Caches: local
Remotes: gs, gs
Workspace directory: apfs on /dev/disk3s1s1
Repo: dvc, git

Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
2022-06-29 18:18:32,462 DEBUG: Analytics is enabled.
2022-06-29 18:18:32,521 DEBUG: Trying to spawn '['daemon', '-q', 'analytics', '/var/folders/sc/fzd9ffwj06q7v7105x77kg2r0000gp/T/tmptldes1o3']'
2022-06-29 18:18:32,523 DEBUG: Spawned '['daemon', '-q', 'analytics', '/var/folders/sc/fzd9ffwj06q7v7105x77kg2r0000gp/T/tmptldes1o3']'

adesgautam avatar Jun 29 '22 12:06 adesgautam

Thanks, @adesgautam , could you try if the error occurs in dvc 2.10.2 (i.e. install with pip install dvc==2.10.2)

daavoo avatar Jun 29 '22 14:06 daavoo

No, it didn't work. The same error is coming up.

adesgautam avatar Jun 29 '22 17:06 adesgautam

It's likely the bucket does not exist. You can create it through the web console or with gsutil using gsutil mb gs://dvctmp.

dtrifiro avatar Aug 31 '22 13:08 dtrifiro

closing as stale

efiop avatar Jan 01 '23 21:01 efiop