Installation of Couchbase Python SDK 3.0.10 failing on python 3.8.5, Ubuntu 22.04

Hi, I am not able to install Couchbase Python SDK of version 3.0.10. I am using Ubuntu 22.04 and with pyenv I set global python to 3.8.5.
The requirements are installed:

sudo apt install git-all python3-dev python3-pip python3-setuptools cmake build-essential libssl-dev
sudo apt-get install libssl-dev

I must use Couchbase 3.0.10. I have tried out other python versions (3.9 and 3.10) but all installations fail.
The first error shows that I need to install docutils, but I have them installed in my venv and globally.
Here is the error:

$ python3 -m pip install couchbase==3.0.10
Collecting couchbase==3.0.10
  Using cached couchbase-3.0.10.tar.gz (1.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: attrs>=19.1.0 in ./.venv/lib/python3.8/site-packages (from couchbase==3.0.10) (21.4.0)
Requirement already satisfied: wrapt>=1.11.2 in ./.venv/lib/python3.8/site-packages (from couchbase==3.0.10) (1.14.1)
Requirement already satisfied: pyrsistent>=0.15.2 in ./.venv/lib/python3.8/site-packages (from couchbase==3.0.10) (0.18.1)
Requirement already satisfied: mypy-extensions in ./.venv/lib/python3.8/site-packages (from couchbase==3.0.10) (0.4.3)
Requirement already satisfied: six in ./.venv/lib/python3.8/site-packages (from couchbase==3.0.10) (1.16.0)
Building wheels for collected packages: couchbase
  Building wheel for couchbase (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for couchbase (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [900 lines of output]
      /tmp/pip-install-jdv9fnu7/couchbase_3a9b26b317cc4b378fb5eef06c0a77be/gen_config.py:55: UserWarning: problem: Traceback (most recent call last):
        File "/tmp/pip-install-jdv9fnu7/couchbase_3a9b26b317cc4b378fb5eef06c0a77be/gen_config.py", line 36, in get_lcb_min_version
          import docutils.parsers.rst
      ModuleNotFoundError: No module named 'docutils'
      
        warnings.warn("problem: {}".format(traceback.format_exc()))
      ERROR:root:{'ext_modules': [<cmake_build.CMakeExtension('couchbase_core._libcouchbase') at 0x7f823cb3ae20>]}
      INFO:root:running bdist_wheel
      INFO:root:running build
      INFO:root:running build_py
      INFO:root:creating build
      INFO:root:creating build/lib.linux-x86_64-cpython-38
      INFO:root:creating build/lib.linux-x86_64-cpython-38/txcouchbase
      INFO:root:copying txcouchbase/cluster.py -> build/lib.linux-x86_64-cpython-38/txcouchbase
      INFO:root:copying txcouchbase/iops.py -> build/lib.linux-x86_64-cpython-38/txcouchbase
      INFO:root:copying txcouchbase/__init__.py -> build/lib.linux-x86_64-cpython-38/txcouchbase
      INFO:root:creating build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:creating build/lib.linux-x86_64-cpython-38/couchbase_core/iops
      INFO:root:copying couchbase_core/iops/base.py -> build/lib.linux-x86_64-cpython-38/couchbase_core/iops
      INFO:root:copying couchbase_core/iops/select.py -> build/lib.linux-x86_64-cpython-38/couchbase_core/iops
      INFO:root:copying couchbase_core/iops/__init__.py -> build/lib.linux-x86_64-cpython-38/couchbase_core/iops
      INFO:root:creating build/lib.linux-x86_64-cpython-38/couchbase
      INFO:root:copying couchbase/bucket.py -> build/lib.linux-x86_64-cpython-38/couchbase
      INFO:root:copying couchbase/exceptions.py -> build/lib.linux-x86_64-cpython-38/couchbase
      INFO:root:copying couchbase/cluster.py -> build/lib.linux-x86_64-cpython-38/couchbase
      INFO:root:copying couchbase/auth.py -> build/lib.linux-x86_64-cpython-38/couchbase
      INFO:root:copying couchbase/options.py -> build/lib.linux-x86_64-cpython-38/couchbase
      INFO:root:copying couchbase/JSONdocument.py -> build/lib.linux-x86_64-cpython-38/couchbase
      INFO:root:copying couchbase/n1ql.py -> build/lib.linux-x86_64-cpython-38/couchbase
      INFO:root:copying couchbase/diagnostics.py -> build/lib.linux-x86_64-cpython-38/couchbase
      INFO:root:copying couchbase/analytics.py -> build/lib.linux-x86_64-cpython-38/couchbase
      INFO:root:copying couchbase/durability.py -> build/lib.linux-x86_64-cpython-38/couchbase
      INFO:root:copying couchbase/search.py -> build/lib.linux-x86_64-cpython-38/couchbase
      INFO:root:copying couchbase/result.py -> build/lib.linux-x86_64-cpython-38/couchbase
      INFO:root:copying couchbase/__init__.py -> build/lib.linux-x86_64-cpython-38/couchbase
      INFO:root:copying couchbase/collection.py -> build/lib.linux-x86_64-cpython-38/couchbase
      INFO:root:copying couchbase/subdocument.py -> build/lib.linux-x86_64-cpython-38/couchbase
      INFO:root:copying couchbase/mutation_state.py -> build/lib.linux-x86_64-cpython-38/couchbase
      INFO:root:creating build/lib.linux-x86_64-cpython-38/couchbase_core/asynchronous
      INFO:root:copying couchbase_core/asynchronous/view.py -> build/lib.linux-x86_64-cpython-38/couchbase_core/asynchronous
      INFO:root:copying couchbase_core/asynchronous/n1ql.py -> build/lib.linux-x86_64-cpython-38/couchbase_core/asynchronous
      INFO:root:copying couchbase_core/asynchronous/client.py -> build/lib.linux-x86_64-cpython-38/couchbase_core/asynchronous
      INFO:root:copying couchbase_core/asynchronous/analytics.py -> build/lib.linux-x86_64-cpython-38/couchbase_core/asynchronous
      INFO:root:copying couchbase_core/asynchronous/__init__.py -> build/lib.linux-x86_64-cpython-38/couchbase_core/asynchronous
      INFO:root:copying couchbase_core/asynchronous/rowsbase.py -> build/lib.linux-x86_64-cpython-38/couchbase_core/asynchronous
      INFO:root:copying couchbase_core/asynchronous/events.py -> build/lib.linux-x86_64-cpython-38/couchbase_core/asynchronous
      INFO:root:creating build/lib.linux-x86_64-cpython-38/acouchbase
      INFO:root:copying acouchbase/cluster.py -> build/lib.linux-x86_64-cpython-38/acouchbase
      INFO:root:copying acouchbase/iterator.py -> build/lib.linux-x86_64-cpython-38/acouchbase
      INFO:root:copying acouchbase/__init__.py -> build/lib.linux-x86_64-cpython-38/acouchbase
      INFO:root:copying acouchbase/asyncio_iops.py -> build/lib.linux-x86_64-cpython-38/acouchbase
      INFO:root:creating build/lib.linux-x86_64-cpython-38/couchbase/management
      INFO:root:copying couchbase/management/users.py -> build/lib.linux-x86_64-cpython-38/couchbase/management
      INFO:root:copying couchbase/management/queries.py -> build/lib.linux-x86_64-cpython-38/couchbase/management
      INFO:root:copying couchbase/management/collections.py -> build/lib.linux-x86_64-cpython-38/couchbase/management
      INFO:root:copying couchbase/management/analytics.py -> build/lib.linux-x86_64-cpython-38/couchbase/management
      INFO:root:copying couchbase/management/admin.py -> build/lib.linux-x86_64-cpython-38/couchbase/management
      INFO:root:copying couchbase/management/buckets.py -> build/lib.linux-x86_64-cpython-38/couchbase/management
      INFO:root:copying couchbase/management/search.py -> build/lib.linux-x86_64-cpython-38/couchbase/management
      INFO:root:copying couchbase/management/views.py -> build/lib.linux-x86_64-cpython-38/couchbase/management
      INFO:root:copying couchbase/management/__init__.py -> build/lib.linux-x86_64-cpython-38/couchbase/management
      INFO:root:copying couchbase/management/generic.py -> build/lib.linux-x86_64-cpython-38/couchbase/management
      INFO:root:creating build/lib.linux-x86_64-cpython-38/couchbase/asynchronous
      INFO:root:copying couchbase/asynchronous/search.py -> build/lib.linux-x86_64-cpython-38/couchbase/asynchronous
      INFO:root:copying couchbase/asynchronous/__init__.py -> build/lib.linux-x86_64-cpython-38/couchbase/asynchronous
      INFO:root:copying couchbase_core/analytics_ingester.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/mockserver.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/transcoder.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/cluster.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/supportability.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/_logutil.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/n1ql.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/_bootstrap.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/_pyport.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/client.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/connstr.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/analytics.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/durability.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/bucketmanager.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/transcodable.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/_version.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/crypto.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/priv_constants.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/experimental.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/result.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/_ixmgmt.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/mapper.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/__init__.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/user_constants.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/items.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:copying couchbase_core/subdocument.py -> build/lib.linux-x86_64-cpython-38/couchbase_core
      INFO:root:creating build/lib.linux-x86_64-cpython-38/couchbase_core/views
      INFO:root:copying couchbase_core/views/iterator.py -> build/lib.linux-x86_64-cpython-38/couchbase_core/views
      INFO:root:copying couchbase_core/views/__init__.py -> build/lib.linux-x86_64-cpython-38/couchbase_core/views
      INFO:root:copying couchbase_core/views/params.py -> build/lib.linux-x86_64-cpython-38/couchbase_core/views
      INFO:root:running build_ext
      Build type: CMAKE_HYBRID, cmake:True
      []
      {}
      set base as None
      Got platform linux
      got pkgs ['libcouchbase.so.6']
      Got platform linux
      yielding binary libcouchbase.so.6 : /tmp/pip-install-jdv9fnu7/couchbase_3a9b26b317cc4b378fb5eef06c0a77be/couchbase_core/libcouchbase.so.6
      From: temp_build_dir build/temp.linux-x86_64-cpython-38 and ssl_relative_path None Got ssl_abs_path /tmp/pip-install-jdv9fnu7/couchbase_3a9b26b317cc4b378fb5eef06c0a77be/build/temp.linux-x86_64-cpython-38/openssl

This is not a full error log, I cut the middle part since there seemed like no useful error messages, here is the ending:

INFO:root:creating build/temp.linux-x86_64-cpython-38/src
      INFO:root:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ibuild/temp.linux-x86_64-cpython-38/install/include -I/home/my-pc/PycharmProjects/my-project/.venv/include -I/home/my-pc/.pyenv/versions/3.8.5/include/python3.8 -Ibuild/temp.linux-x86_64-cpython-38/install/include -c src/bucket.c -o build/temp.linux-x86_64-cpython-38/src/bucket.o -Wno-strict-prototypes -fPIC -std=c11 -Wuninitialized -Wswitch -Werror -Wno-missing-braces -DPYCBC_LCB_API=0x02FF04 -DPYCBC_LCB_API=0x02FF04
      INFO:root:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ibuild/temp.linux-x86_64-cpython-38/install/include -I/home/my-pc/PycharmProjects/my-project/.venv/include -I/home/my-pc/.pyenv/versions/3.8.5/include/python3.8 -Ibuild/temp.linux-x86_64-cpython-38/install/include -c src/callbacks.c -o build/temp.linux-x86_64-cpython-38/src/callbacks.o -Wno-strict-prototypes -fPIC -std=c11 -Wuninitialized -Wswitch -Werror -Wno-missing-braces -DPYCBC_LCB_API=0x02FF04 -DPYCBC_LCB_API=0x02FF04
      INFO:root:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ibuild/temp.linux-x86_64-cpython-38/install/include -I/home/my-pc/PycharmProjects/my-project/.venv/include -I/home/my-pc/.pyenv/versions/3.8.5/include/python3.8 -Ibuild/temp.linux-x86_64-cpython-38/install/include -c src/cntl.c -o build/temp.linux-x86_64-cpython-38/src/cntl.o -Wno-strict-prototypes -fPIC -std=c11 -Wuninitialized -Wswitch -Werror -Wno-missing-braces -DPYCBC_LCB_API=0x02FF04 -DPYCBC_LCB_API=0x02FF04
      INFO:root:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ibuild/temp.linux-x86_64-cpython-38/install/include -I/home/my-pc/PycharmProjects/my-project/.venv/include -I/home/my-pc/.pyenv/versions/3.8.5/include/python3.8 -Ibuild/temp.linux-x86_64-cpython-38/install/include -c src/connevents.c -o build/temp.linux-x86_64-cpython-38/src/connevents.o -Wno-strict-prototypes -fPIC -std=c11 -Wuninitialized -Wswitch -Werror -Wno-missing-braces -DPYCBC_LCB_API=0x02FF04 -DPYCBC_LCB_API=0x02FF04
      INFO:root:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ibuild/temp.linux-x86_64-cpython-38/install/include -I/home/my-pc/PycharmProjects/my-project/.venv/include -I/home/my-pc/.pyenv/versions/3.8.5/include/python3.8 -Ibuild/temp.linux-x86_64-cpython-38/install/include -c src/constants.c -o build/temp.linux-x86_64-cpython-38/src/constants.o -Wno-strict-prototypes -fPIC -std=c11 -Wuninitialized -Wswitch -Werror -Wno-missing-braces -DPYCBC_LCB_API=0x02FF04 -DPYCBC_LCB_API=0x02FF04
      INFO:root:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ibuild/temp.linux-x86_64-cpython-38/install/include -I/home/my-pc/PycharmProjects/my-project/.venv/include -I/home/my-pc/.pyenv/versions/3.8.5/include/python3.8 -Ibuild/temp.linux-x86_64-cpython-38/install/include -c src/convert.c -o build/temp.linux-x86_64-cpython-38/src/convert.o -Wno-strict-prototypes -fPIC -std=c11 -Wuninitialized -Wswitch -Werror -Wno-missing-braces -DPYCBC_LCB_API=0x02FF04 -DPYCBC_LCB_API=0x02FF04
      INFO:root:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ibuild/temp.linux-x86_64-cpython-38/install/include -I/home/my-pc/PycharmProjects/my-project/.venv/include -I/home/my-pc/.pyenv/versions/3.8.5/include/python3.8 -Ibuild/temp.linux-x86_64-cpython-38/install/include -c src/counter.c -o build/temp.linux-x86_64-cpython-38/src/counter.o -Wno-strict-prototypes -fPIC -std=c11 -Wuninitialized -Wswitch -Werror -Wno-missing-braces -DPYCBC_LCB_API=0x02FF04 -DPYCBC_LCB_API=0x02FF04
      INFO:root:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ibuild/temp.linux-x86_64-cpython-38/install/include -I/home/my-pc/PycharmProjects/my-project/.venv/include -I/home/my-pc/.pyenv/versions/3.8.5/include/python3.8 -Ibuild/temp.linux-x86_64-cpython-38/install/include -c src/crypto.c -o build/temp.linux-x86_64-cpython-38/src/crypto.o -Wno-strict-prototypes -fPIC -std=c11 -Wuninitialized -Wswitch -Werror -Wno-missing-braces -DPYCBC_LCB_API=0x02FF04 -DPYCBC_LCB_API=0x02FF04
      INFO:root:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ibuild/temp.linux-x86_64-cpython-38/install/include -I/home/my-pc/PycharmProjects/my-project/.venv/include -I/home/my-pc/.pyenv/versions/3.8.5/include/python3.8 -Ibuild/temp.linux-x86_64-cpython-38/install/include -c src/ctranscoder.c -o build/temp.linux-x86_64-cpython-38/src/ctranscoder.o -Wno-strict-prototypes -fPIC -std=c11 -Wuninitialized -Wswitch -Werror -Wno-missing-braces -DPYCBC_LCB_API=0x02FF04 -DPYCBC_LCB_API=0x02FF04
      INFO:root:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ibuild/temp.linux-x86_64-cpython-38/install/include -I/home/my-pc/PycharmProjects/my-project/.venv/include -I/home/my-pc/.pyenv/versions/3.8.5/include/python3.8 -Ibuild/temp.linux-x86_64-cpython-38/install/include -c src/exceptions.c -o build/temp.linux-x86_64-cpython-38/src/exceptions.o -Wno-strict-prototypes -fPIC -std=c11 -Wuninitialized -Wswitch -Werror -Wno-missing-braces -DPYCBC_LCB_API=0x02FF04 -DPYCBC_LCB_API=0x02FF04
      INFO:root:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ibuild/temp.linux-x86_64-cpython-38/install/include -I/home/my-pc/PycharmProjects/my-project/.venv/include -I/home/my-pc/.pyenv/versions/3.8.5/include/python3.8 -Ibuild/temp.linux-x86_64-cpython-38/install/include -c src/ext.c -o build/temp.linux-x86_64-cpython-38/src/ext.o -Wno-strict-prototypes -fPIC -std=c11 -Wuninitialized -Wswitch -Werror -Wno-missing-braces -DPYCBC_LCB_API=0x02FF04 -DPYCBC_LCB_API=0x02FF04
      INFO:root:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ibuild/temp.linux-x86_64-cpython-38/install/include -I/home/my-pc/PycharmProjects/my-project/.venv/include -I/home/my-pc/.pyenv/versions/3.8.5/include/python3.8 -Ibuild/temp.linux-x86_64-cpython-38/install/include -c src/fts.c -o build/temp.linux-x86_64-cpython-38/src/fts.o -Wno-strict-prototypes -fPIC -std=c11 -Wuninitialized -Wswitch -Werror -Wno-missing-braces -DPYCBC_LCB_API=0x02FF04 -DPYCBC_LCB_API=0x02FF04
      INFO:root:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ibuild/temp.linux-x86_64-cpython-38/install/include -I/home/my-pc/PycharmProjects/my-project/.venv/include -I/home/my-pc/.pyenv/versions/3.8.5/include/python3.8 -Ibuild/temp.linux-x86_64-cpython-38/install/include -c src/get.c -o build/temp.linux-x86_64-cpython-38/src/get.o -Wno-strict-prototypes -fPIC -std=c11 -Wuninitialized -Wswitch -Werror -Wno-missing-braces -DPYCBC_LCB_API=0x02FF04 -DPYCBC_LCB_API=0x02FF04
      INFO:root:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ibuild/temp.linux-x86_64-cpython-38/install/include -I/home/my-pc/PycharmProjects/my-project/.venv/include -I/home/my-pc/.pyenv/versions/3.8.5/include/python3.8 -Ibuild/temp.linux-x86_64-cpython-38/install/include -c src/htresult.c -o build/temp.linux-x86_64-cpython-38/src/htresult.o -Wno-strict-prototypes -fPIC -std=c11 -Wuninitialized -Wswitch -Werror -Wno-missing-braces -DPYCBC_LCB_API=0x02FF04 -DPYCBC_LCB_API=0x02FF04
      INFO:root:gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ibuild/temp.linux-x86_64-cpython-38/install/include -I/home/my-pc/PycharmProjects/my-project/.venv/include -I/home/my-pc/.pyenv/versions/3.8.5/include/python3.8 -Ibuild/temp.linux-x86_64-cpython-38/install/include -c src/iops.c -o build/temp.linux-x86_64-cpython-38/src/iops.o -Wno-strict-prototypes -fPIC -std=c11 -Wuninitialized -Wswitch -Werror -Wno-missing-braces -DPYCBC_LCB_API=0x02FF04 -DPYCBC_LCB_API=0x02FF04
      src/iops.c: In function ‘update_event’:
      src/iops.c:412:17: error: array subscript ‘lcb_uint32_t {aka unsigned int}[0]’ is partly outside array bounds of ‘short int[1]’ [-Werror=array-bounds]
        412 |         usecs = *(lcb_uint32_t*)arg;
            |                 ^~~~~~~~~~~~~~~~~~~
      src/iops.c:516:69: note: while referencing ‘flags’
        516 | update_event(lcb_io_opt_t io, lcb_socket_t sock, void *event, short flags,
            |                                                               ~~~~~~^~~~~
      src/iops.c: In function ‘delete_event’:
      src/iops.c:412:17: error: array subscript ‘lcb_uint32_t {aka unsigned int}[0]’ is partly outside array bounds of ‘short int[1]’ [-Werror=array-bounds]
        412 |         usecs = *(lcb_uint32_t*)arg;
            |                 ^~~~~~~~~~~~~~~~~~~
      src/iops.c:548:11: note: while referencing ‘tmp’
        548 |     short tmp = 0;
            |           ^~~
      cc1: all warnings being treated as errors
      
      Got platform linux
      self.base is ['build', 'temp.linux-x86_64-cpython-38']
      self.base is ['build', 'temp.linux-x86_64-cpython-38']
      self.base is ['build', 'temp.linux-x86_64-cpython-38']
      self.base is ['build', 'temp.linux-x86_64-cpython-38']
      copying build/temp.linux-x86_64-cpython-38/install/lib/Release/libcouchbase.so.6 to /tmp/pip-install-jdv9fnu7/couchbase_3a9b26b317cc4b378fb5eef06c0a77be/build/lib.linux-x86_64-cpython-38/couchbase_core/libcouchbase.so.6
      success
      self.base is ['build', 'temp.linux-x86_64-cpython-38']
      self.base is ['build', 'temp.linux-x86_64-cpython-38']
      self.base is ['build', 'temp.linux-x86_64-cpython-38']
      self.base is ['build', 'temp.linux-x86_64-cpython-38']
      copying build/temp.linux-x86_64-cpython-38/install/lib/Release/libcouchbase.so.6 to /tmp/pip-install-jdv9fnu7/couchbase_3a9b26b317cc4b378fb5eef06c0a77be/couchbase_core/libcouchbase.so.6
      success
      self.base is ['build', 'temp.linux-x86_64-cpython-38']
      self.base is ['build', 'temp.linux-x86_64-cpython-38']
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for couchbase
Failed to build couchbase
ERROR: Could not build wheels for couchbase, which is required to install pyproject.toml-based projects

The error at the beginning mentioning ModuleNotFoundError: No module named ‘docutils’ has been tried out. I have this installed both in venv and globally:

$ pip3 install docutils                                                         
Requirement already satisfied: docutils in ./.venv/lib/python3.8/site-packages (0.19)

I was able to install couchbase while using Ubuntu 20 LTS, and since I upgraded to Ubuntu 22.04 LTS it fails. Perhaps someone has encountered this issue and knows what should I do?

Hi @deivydaslipskis – This issue was fixed with PYCBC-1178. Are you able to upgrade to the Python SDK version 3.2.7?

Unfortunately, I am not able to upgrade from 3.0.10. So is the 3.0.10 version not supported by Ubuntu 22.04?

@jcasey I tried using the 3.2.7 version, but I seem not to be able to use the get operation to retrieve a document by id. Is using collection mandatory in this version?
Here is an example how I retrieve document by id previously:

from couchbase.cluster import ClusterOptions, ClusterTimeoutOptions, PasswordAuthenticator
from acouchbase.cluster import Cluster

self.cluster = Cluster(
            host,
            options=ClusterOptions(
                authenticator=PasswordAuthenticator(self.user, self.password),
                timeout_options=ClusterTimeoutOptions(
                    query_timeout=self.timeout,
                    kv_timeout=self.timeout,
                    views_timeout=self.timeout,
                    config_total_timeout=self.timeout,
                ),
            ),
        )

self.bucket = self.cluster.bucket(self.bucket_name)

doc_key = "test_user" # this user exists in couchbase database

data = (await self.bucket.get(doc_key)).value

After upgrading I receive this error:

TypeError: object AsyncResult can't be used in 'await' expression

Therefore, I have tried to receive document id in this method:

data = self.bucket.get(doc_key)

This does not error, but I receive this:

print(data)
{}
 type(data)
<class 'AsyncResult'>

The document id is in the Couchbase database for sure, I have tried several over document ids and all return the same empty result.

How should get operation look in 3.2.7 SDK?

Also, I saw get operation examples using collections, but I need to use get operation without using collections.

Hi @deivydaslipskis - We do not officially support Ubuntu 22.04 yet, but the more recent versions of the SDK should work w/ that OS. You can check out the compatibility docs for the 3.0 SDK series here.

When working with an SDK that is compliant with an SDK API >= 3.0, you need to do KV operations from a collection object. Even if you are not using collections. See the CRUD operation docs here. The full example can be found on Github here. I have included a small snippet of the doc’s example below.

from acouchbase.cluster import Cluster, get_event_loop
from couchbase.cluster import ClusterOptions
from couchbase.auth import PasswordAuthenticator

async def get_couchbase():
    cluster = Cluster(
        "couchbase://localhost",
        ClusterOptions(PasswordAuthenticator("Administrator", "password")))
    bucket = cluster.bucket("travel-sample")
    await bucket.on_connect()

    return cluster, bucket

async def kv_operations(collection):
    key = "hotel_10025"
    res = await collection.get(key)
    hotel = res.content_as[dict]
    print("Hotel: {}".format(hotel))

    hotel["alias"] = "Hostel"
    res = await collection.upsert(key, hotel)
    print("CAS: {}".format(res.cas))

    # handle exception
    try:
        res = await collection.get("not-a-key")
    except DocumentNotFoundException as ex:
        print("Document not found exception caught!")

loop = get_event_loop()
cluster, bucket = loop.run_until_complete(get_couchbase())
# get a reference to the default collection, required for older Couchbase server versions
cb_coll_default = bucket.default_collection()

loop.run_until_complete(kv_operations(cb_coll))
1 Like

Hi @jcasey - Seems to be working, thanks!