cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

DBUtils cannot find widgets [Windows 10]

BorislavBlagoev
Valued Contributor III

I use databricks connect to connect PyCharm with databricks cluster remotely but when I try to get dbutils.widget throw an error.

cluster conf:

spark.databricks.service.server.enabled true

spark.databricks.hive.metastore.glueCatalog.enabled true

spark.databricks.service.client.enabled true

spark.hadoop.fs.s3a.acl.default BucketOwnerFullControl

error: AttributeError: 'DBUtils' object has no attribute 'widgets'

code:

from pyspark.sql import SparkSession<br>from pyspark.dbutils import DBUtils<br><br>spark = SparkSession.builder.getOrCreate()<br><br>dbutils = DBUtils(spark)<br>

2 REPLIES 2

-werners-
Esteemed Contributor III

This is normal behavior. databricks-connect does not support the whole dbutils class.

https://docs.databricks.com/dev-tools/databricks-connect.html#access-dbutils

Widgets are not on the list.

BorislavBlagoev
Valued Contributor III

Thanks!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group