Skip to content

[BUG]: cannot import name 'with_user_agent_extra' from 'databricks.sdk.core' #2102

@CedricEdouardKassi

Description

@CedricEdouardKassi

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Hello,
Following a Unity Catalog migration, I'm trying to migrate local groups with UCX.
But, I get the following error message when running the Workflows migrate-groups(task verify_metastore_attached run):

File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.11/site-packages/databricks/labs/blueprint/init.py:1
----> 1 from databricks.sdk.core import with_user_agent_extra
3 from .about import version
5 with_user_agent_extra("blueprint", version)

ImportError: cannot import name 'with_user_agent_extra' from 'databricks.sdk.core' (/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.11/site-packages/databricks/sdk/core.py)

Do you have a solution? Thanks in advance for your help.

Expected Behavior

No response

Steps To Reproduce

No response

Cloud

Azure

Operating System

macOS

Version

latest via Databricks CLI

Relevant log output

ImportError: cannot import name 'with_user_agent_extra' from 'databricks.sdk.core' (/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.11/site-packages/databricks/sdk/core.py)
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
File ~/.ipykernel/1937/command--1-3279393622:18
     15 entry = [ep for ep in metadata.distribution("databricks_labs_ucx").entry_points if ep.name == "runtime"]
     16 if entry:
     17   # Load and execute the entrypoint, assumes no parameters
---> 18   entry[0].load()()
     19 else:
     20   import importlib

File /usr/lib/python3.11/importlib/metadata/__init__.py:201, in EntryPoint.load(self)
    196 """Load the entry point from its definition. If only a module
    197 is indicated by the value, return that module. Otherwise,
    198 return the named object.
    199 """
    200 match = self.pattern.match(self.value)
--> 201 module = import_module(match.group('module'))
    202 attrs = filter(None, (match.group('attr') or '').split('.'))
    203 return functools.reduce(getattr, attrs, module)

File /usr/lib/python3.11/importlib/__init__.py:126, in import_module(name, package)
    124             break
    125         level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)

File <frozen importlib._bootstrap>:1206, in _gcd_import(name, package, level)

File <frozen importlib._bootstrap>:1178, in _find_and_load(name, import_)

File <frozen importlib._bootstrap>:1128, in _find_and_load_unlocked(name, import_)

File <frozen importlib._bootstrap>:241, in _call_with_frames_removed(f, *args, **kwds)

File <frozen importlib._bootstrap>:1206, in _gcd_import(name, package, level)

File <frozen importlib._bootstrap>:1178, in _find_and_load(name, import_)

File <frozen importlib._bootstrap>:1149, in _find_and_load_unlocked(name, import_)

File <frozen importlib._bootstrap>:690, in _load_unlocked(spec)

File <frozen importlib._bootstrap_external>:940, in exec_module(self, module)

File <frozen importlib._bootstrap>:241, in _call_with_frames_removed(f, *args, **kwds)

File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.11/site-packages/databricks/labs/ucx/__init__.py:1
----> 1 from databricks.labs.blueprint.logger import install_logger
      3 install_logger()

File /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.11/site-packages/databricks/labs/blueprint/__init__.py:1
----> 1 from databricks.sdk.core import with_user_agent_extra
      3 from .__about__ import __version__
      5 with_user_agent_extra("blueprint", __version__)

ImportError: cannot import name 'with_user_agent_extra' from 'databricks.sdk.core' (/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.11/site-packages/databricks/sdk/core.py)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions