# Dvc push error: unexpected keyword argument

**URL:** <https://discuss.dvc.org/t/dvc-push-error-unexpected-keyword-argument/896>\
**Category:** Questions\
**Created:** [September 20, 2021, 8:14pm UTC](https://discuss.dvc.org/t/dvc-push-error-unexpected-keyword-argument/896 "2021-09-20T20:14:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rancat](https://avatars.discourse-cdn.com/v4/letter/r/bbce88/32.png) [@rancat](https://discuss.dvc.org/u/rancat)\
**Post date:** [September 20, 2021, 8:14pm UTC](https://discuss.dvc.org/t/dvc-push-error-unexpected-keyword-argument/896/1 "2021-09-20T20:14:49Z")

</div>

I added my data with `dvc add mydata/path` then i got `mydata.dvc`  
the `config` file in `.dvc` folder is

> [core]  
> remote = my\_remote  
> [cache]  
> type = “reflink,hardlink”  
> [‘remote “my\_remote”’]  
> url = s3://…

when i ran `dvc push`  
it raised an error

> unexpected error - **init** () got an unexpected keyword argument ‘cache\_regions’

can anyone help me figure out this problem?

> Traceback (most recent call last):  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/dvc/main.py”, line 55, in main  
> ret = cmd.do\_run()  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/dvc/command/base.py”, line 45, in do\_run  
> return self.run()  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/dvc/command/data\_sync.py”, line 57, in run  
> processed\_files\_count = self.repo.push(  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/dvc/repo/ **init**.py”, line 50, in wrapper  
> return f(repo, \*args, \*\*kwargs)  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/dvc/repo/push.py”, line 48, in push  
> pushed += self.cloud.push(obj\_ids, jobs, remote=remote, odb=odb)  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/dvc/data\_cloud.py”, line 85, in push  
> return transfer(  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/dvc/objects/transfer.py”, line 153, in transfer  
> status = compare\_status(src, dest, obj\_ids, check\_deleted=False, \*\*kwargs)  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/dvc/objects/status.py”, line 160, in compare\_status  
> dest\_exists, dest\_missing = status(  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/dvc/objects/status.py”, line 122, in status  
> exists = hashes.intersection(  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/dvc/objects/status.py”, line 48, in \_indexed\_dir\_hashes  
> dir\_exists.update(odb.list\_hashes\_exists(dir\_hashes - dir\_exists))  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/dvc/objects/db/base.py”, line 415, in list\_hashes\_exists  
> ret = list(itertools.compress(hashes, in\_remote))  
> File “/home/ubuntu/anaconda3/lib/python3.8/concurrent/futures/\_base.py”, line 611, in result\_iterator  
> yield fs.pop().result()  
> File “/home/ubuntu/anaconda3/lib/python3.8/concurrent/futures/\_base.py”, line 432, in result  
> return self.\_\_get\_result()  
> File “/home/ubuntu/anaconda3/lib/python3.8/concurrent/futures/\_base.py”, line 388, in \_\_get\_result  
> raise self.\_exception  
> File “/home/ubuntu/anaconda3/lib/python3.8/concurrent/futures/thread.py”, line 57, in run  
> result = self.fn(\*self.args, \*\*self.kwargs)  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/dvc/objects/db/base.py”, line 406, in exists\_with\_progress  
> ret = self.fs.exists(path\_info)  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/dvc/fs/fsspec\_wrapper.py”, line 97, in exists  
> return self.fs.exists(self.\_with\_bucket(path\_info))  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/funcy/objects.py”, line 50, in **get**  
> return prop. **get** (instance, type)  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/funcy/objects.py”, line 28, in **get**  
> res = instance. **dict** [self.fget. **name**] = self.fget(instance)  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/dvc/fs/s3.py”, line 157, in fs  
> return \_S3FileSystem(\*\*self.fs\_args)  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/fsspec/spec.py”, line 75, in **call**  
> obj = super(). **call** (\*args, \*\*kwargs)  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/s3fs/core.py”, line 187, in **init**  
> self.s3 = self.connect()  
> File “/home/ubuntu/anaconda3/lib/python3.8/site-packages/s3fs/core.py”, line 280, in connect  
> self.session = botocore.session.Session(\*\*self.kwargs)  
> TypeError: **init** () got an unexpected keyword argument ‘cache\_regions’

## DEBUG: Version info for developers: DVC version: 2.7.4 (pip)

Platform: Python 3.8.5 on Linux-5.4.0-1056-aws-x86\_64-with-glibc2.10  
Supports:  
hdfs (pyarrow = 4.0.1),  
http (aiohttp = 3.7.4.post0, aiohttp-retry = 2.4.5),  
https (aiohttp = 3.7.4.post0, aiohttp-retry = 2.4.5),  
s3 (s3fs = 0.4.2, boto3 = 1.17.72)  
Cache types: hardlink, symlink  
Cache directory: ext4 on /dev/nvme0n1p1  
Caches: local  
Remotes: s3  
Workspace directory: ext4 on /dev/nvme0n1p1  
Repo: dvc, git

---

<div class="post-metadata">

**Author:** ![YanxiangGao](https://avatars.discourse-cdn.com/v4/letter/y/f04885/32.png) [@YanxiangGao](https://discuss.dvc.org/u/YanxiangGao)\
**Post date:** [September 21, 2021, 4:09am UTC](https://discuss.dvc.org/t/dvc-push-error-unexpected-keyword-argument/896/2 "2021-09-21T04:09:36Z")

</div>

s3 (s3fs = 0.4.2, boto3 = 1.17.72)

It is a really old version of s3fs, could you please update your s3fs via

pip install --upgrade’dvc[s3]’

and try again?  
?

---

<div class="post-metadata">

**Author:** ![rancat](https://avatars.discourse-cdn.com/v4/letter/r/bbce88/32.png) [@rancat](https://discuss.dvc.org/u/rancat)\
**Post date:** [September 21, 2021, 9:15pm UTC](https://discuss.dvc.org/t/dvc-push-error-unexpected-keyword-argument/896/3 "2021-09-21T21:15:14Z")

</div>

Thank you.  
I solved it by re-install dvc then everything is fine. so i think this old version may be the cause.
