Search code examples
python-3.xbashamazon-s3dvc

DVC | ERROR: unexpected error - _register_s3_control_events() takes 2 positional arguments but 6 were given


Only as of recently, have I had this error with DVC.

Tracback:

(venv) me@ubuntu-pcs:~/PycharmProjects/project$ dvc push
ERROR: unexpected error - _register_s3_control_events() takes 2 positional arguments but 6 were given                                                                                                                                                          

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

(venv) me@ubuntu-pcs:~/PycharmProjects/project$ dvc doctor
DVC version: 2.28.0 (pip)
---------------------------------
Platform: Python 3.9.13 on Linux-5.15.0-52-generic-x86_64-with-glibc2.35
Subprojects:
        dvc_data = 0.13.0
        dvc_objects = 0.5.0
        dvc_render = 0.0.11
        dvc_task = 0.1.2
        dvclive = 0.12.1
        scmrepo = 0.1.1
Supports:
        http (aiohttp = 3.8.3, aiohttp-retry = 2.8.3),
        https (aiohttp = 3.8.3, aiohttp-retry = 2.8.3),
        s3 (s3fs = 2022.10.0, boto3 = 1.24.59)
Cache types: hardlink, symlink
Cache directory: ext4 on /dev/nvme0n1p5
Caches: local
Remotes: s3
Workspace directory: ext4 on /dev/nvme0n1p5
Repo: dvc, git

.dvc/config/:

[core]
    remote = storage
    autostage = true
['remote "storage"']
    url = s3://bucket/project/dvcstore/

Let me know if I should add anything else to the post.

It looks like your post is mostly code; please add some more details.


Solution

  • Solution

    pip check checks whether dependencies for installed packages are compatible.

    (venv) me@ubuntu-pcs:~/PycharmProjects/project$ pip check
    # ...
    aiobotocore 2.4.0 has requirement botocore<1.27.60,>=1.27.59, but you have botocore 1.29.0.
    

    I had installed packages with conflicting dependencies. i.e. Packages that required different, but default, versions of botocore.

    Hence why recreating venv didn't work.

    In my case, I had to:

    conda install botocore==1.27.59
    dvc push
    

    And dvc push was working again :)