[BUG] Can't enable autocomplete on v0.3.11
felipeff opened this issue · 1 comments
Describe the bug
On version 0.3.11 when I select the option to enable auto-complete I'm presented with the error message:
Can't read internal type stubs for autocompletion. ENOENT: no such file or directory, open 'c:\Users{user}.vscode\extensions\databricks.databricks-0.3.11-win32-x64\resources\stubs_builtins_.pyi'
While checking the folder, it seems like the stubs folder is inside \databricks.databricks-0.3.11-win32-x64\PYTHON\ and the plugin is checking the wrong folder.
To Reproduce
Steps to reproduce the behavior:
- Install v0.3.11
- Go to View > Command Pallete
- Select Databricks: Configure autocomplete for Databricks globals
System information:
- Paste the output ot the
Help: About
command (CMD-Shift-P).
Version: 1.77.3 (system setup)
Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710
Date: 2023-04-12T09:16:02.548Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Windows_NT x64 10.0.22621
Sandboxed: Yes
- Databricks Extension Version
v0.3.11
Hi. Thanks for the report. The fix is here https://github.com/databricks/databricks-vscode/pull/680/files. you can add this to your __builtins__.pyi
for now.
from databricks.sdk.runtime import *
from pyspark.sql.session import SparkSession
from pyspark.sql.functions import udf as U
from pyspark.sql.context import SQLContext
udf = U
spark: SparkSession
sc = spark.sparkContext
sqlContext: SQLContext
sql = sqlContext.sql
table = sqlContext.table
getArgument = dbutils.widgets.getArgument
def displayHTML(html): ...
def display(input=None, *args, **kwargs): ...