Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-1120

Cannot import name 'Protocol' from 'couchbase_core._pyport'

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Test Blocker
    • Resolution: Fixed
    • 3.1.1
    • 3.1.2, 3.1.3
    • None
    • Python sdk-3.1.1
    • 1

    Description

      Tests are failing due to the following error in the python SDK: 

      Similar issue seen when we run this locally.
       

      >>> from couchbase.cluster import Cluster

      Traceback (most recent call last):

        File "<stdin>", line 1, in <module>

        File "/Users/jyotsna/anaconda3/lib/python3.7/site-packages/couchbase/cluster.py", line 5, in <module>

          from couchbase.management.queries import QueryIndexManager

        File "/Users/jyotsna/anaconda3/lib/python3.7/site-packages/couchbase/management/queries.py", line 8, in <module>

          from couchbase_core._pyport import Protocol

      ImportError: cannot import name 'Protocol' from 'couchbase_core._pyport' (/Users/jyotsna/anaconda3/lib/python3.7/site-packages/couchbase_core/_pyport.py)

      link to a job with a similar stack trace :
      http://perf.jenkins.couchbase.com/view/FTS/job/atlas_collections/767/*
      *

      Attachments

        Issue Links

          For Gerrit Dashboard: PYCBC-1120
          # Subject Branch Project Status CR V

          Activity

            Jared Casey perf tests us python 3.6.12 and python sdk 3.0.8

            korrigan.clark Korrigan Clark (Inactive) added a comment - Jared Casey  perf tests us python 3.6.12 and python sdk 3.0.8

            The typing-extenstions package upgraded over the weekend and has no support for py3.6 anymore https://pypi.org/project/typing-extensions/#:~:text=typing%2Dextensions%203.10.,0.0&text=This%20means%20users%20of%20Python,typing%20module%2C%20such%20as%20typing
            Downgrading system default typing-extension  to last release (https://pypi.org/project/typing-extensions/#history - 3.7.4.3 fixed this
             

            prajwal.kirankumar Prajwal‌ Kiran Kumar‌ (Inactive) added a comment - The typing-extenstions package upgraded over the weekend and has no support for py3.6 anymore  https://pypi.org/project/typing-extensions/#:~:text=typing%2Dextensions%203.10.,0.0&text=This%20means%20users%20of%20Python,typing%20module%2C%20such%20as%20typing Downgrading system default  typing-extension   to last release ( https://pypi.org/project/typing-extensions/#history  - 3.7.4.3 fixed this  
            ritam.sharma Ritam Sharma added a comment -

            Jared Casey - With 3.1.2

              from couchbase.cluster import Cluster, ClusterOptions
              File "/data/workspace/cen006-p0-security-vset01-00-collection-rbac-P0/venv/lib/python3.7/site-packages/couchbase/__init__.py", line 1, in <module>
                import couchbase_core._bootstrap
              File "/data/workspace/cen006-p0-security-vset01-00-collection-rbac-P0/venv/lib/python3.7/site-packages/couchbase_core/_bootstrap.py", line 34, in <module>
                import couchbase.exceptions as E
              File "/data/workspace/cen006-p0-security-vset01-00-collection-rbac-P0/venv/lib/python3.7/site-packages/couchbase/exceptions.py", line 30, in <module>
                from typing_extensions import TypedDict
            ModuleNotFoundError: No module named 'typing_extensions'
            

            Should this be explicitly installed ?

            ritam.sharma Ritam Sharma added a comment - Jared Casey - With 3.1.2 from couchbase.cluster import Cluster, ClusterOptions File "/data/workspace/cen006-p0-security-vset01-00-collection-rbac-P0/venv/lib/python3.7/site-packages/couchbase/__init__.py", line 1, in <module> import couchbase_core._bootstrap File "/data/workspace/cen006-p0-security-vset01-00-collection-rbac-P0/venv/lib/python3.7/site-packages/couchbase_core/_bootstrap.py", line 34, in <module> import couchbase.exceptions as E File "/data/workspace/cen006-p0-security-vset01-00-collection-rbac-P0/venv/lib/python3.7/site-packages/couchbase/exceptions.py", line 30, in <module> from typing_extensions import TypedDict ModuleNotFoundError: No module named 'typing_extensions' Should this be explicitly installed ?
            jared.casey Jared Casey added a comment -

            Hi Ritam Sharma, for Python 3.7 this will need to be an explicitly install. The requirements.txt will be updated for the next release. Once it is merged I will comment here so you can pip install pointing to git to have the corrected requirements.txt.

            jared.casey Jared Casey added a comment - Hi Ritam Sharma , for Python 3.7 this will need to be an explicitly install. The requirements.txt will be updated for the next release. Once it is merged I will comment here so you can pip install pointing to git to have the corrected requirements.txt.
            jared.casey Jared Casey added a comment -

            SDK release 3.1.3 will handle the typing-extensions install correctly for Python 3.7. In the interim, you can use the following to get the latest version of the client.

            pip install git+git://github.com/couchbase/couchbase-python-client
            

            jared.casey Jared Casey added a comment - SDK release 3.1.3 will handle the typing-extensions install correctly for Python 3.7. In the interim, you can use the following to get the latest version of the client. pip install git+git://github.com/couchbase/couchbase-python-client

            People

              jared.casey Jared Casey
              jyotsna.nayak Jyotsna Nayak
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty