cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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>

3 REPLIES 3

Kaniz
Community Manager
Community Manager

Hi @ BorislavBlagoev! My name is Kaniz, and I'm the technical moderator here. Great to meet you, and thanks for your question! Let's see if your peers on the Forum have an answer to your questions first. Or else I will follow up shortly with a response.

-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!

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.