We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from databricks.connect import DatabricksSession as SparkSession from databricks.sdk.core import Config
c = Config(host="https://e2-dogfood.staging.cloud.databricks.com/", cluster_id="0602-101933-eu24cp11") spark = SparkSession.builder.sdkConfig(c).getOrCreate() print(spark.range(100).collect())
MissingSectionHeaderError Traceback (most recent call last) Cell In[3], line 4 1 from databricks.connect import DatabricksSession as SparkSession 2 from databricks.sdk.core import Config ----> 4 c = Config(host="https://e2-dogfood.staging.cloud.databricks.com/", cluster_id="0602-101933-eu24cp11") 5 spark = SparkSession.builder.sdkConfig(c).getOrCreate() 6 print(spark.range(100).collect())
File ~/Documents/Coding/spark_connect_tests/20230615_DBConnect_Test_Oauth/venv_dbconnect_13_1/lib/python3.10/site-packages/databricks/sdk/core.py:493, in Config.init(self, credentials_provider, product, product_version, **kwargs) 491 self._set_inner_config(kwargs) 492 self._load_from_env() --> 493 self._known_file_config_loader() 494 self._fix_host_if_needed() 495 self._validate()
File ~/Documents/Coding/spark_connect_tests/20230615_DBConnect_Test_Oauth/venv_dbconnect_13_1/lib/python3.10/site-packages/databricks/sdk/core.py:732, in Config._known_file_config_loader(self) 730 return 731 ini_file = configparser.ConfigParser() --> 732 ini_file.read(config_path) 733 profile = self.profile 734 has_explicit_profile = self.profile is not None
File ~/miniconda3/lib/python3.10/configparser.py:698, in RawConfigParser.read(self, filenames, encoding) 696 try: 697 with open(filename, encoding=encoding) as fp: --> 698 self._read(fp, filename) 699 except OSError: 700 continue
File ~/miniconda3/lib/python3.10/configparser.py:1086, in RawConfigParser._read(self, fp, fpname) 1084 # no section header in the file? 1085 elif cursect is None: -> 1086 raise MissingSectionHeaderError(fpname, lineno, line) 1087 # an option line? 1088 else: 1089 mo = self._optcre.match(value)
MissingSectionHeaderError: File contains no section headers. file: PosixPath('/Users/vladislav.manticlugo/.databrickscfg'), line: 1 'host = https://e2-dogfood.staging.cloud.databricks.com\n'
The text was updated successfully, but these errors were encountered:
Ignore MissingSectionHeaderError
MissingSectionHeaderError
1d1d6d5
Closes #174
Successfully merging a pull request may close this issue.
from databricks.connect import DatabricksSession as SparkSession
from databricks.sdk.core import Config
c = Config(host="https://e2-dogfood.staging.cloud.databricks.com/", cluster_id="0602-101933-eu24cp11")
spark = SparkSession.builder.sdkConfig(c).getOrCreate()
print(spark.range(100).collect())
MissingSectionHeaderError Traceback (most recent call last)
Cell In[3], line 4
1 from databricks.connect import DatabricksSession as SparkSession
2 from databricks.sdk.core import Config
----> 4 c = Config(host="https://e2-dogfood.staging.cloud.databricks.com/", cluster_id="0602-101933-eu24cp11")
5 spark = SparkSession.builder.sdkConfig(c).getOrCreate()
6 print(spark.range(100).collect())
File ~/Documents/Coding/spark_connect_tests/20230615_DBConnect_Test_Oauth/venv_dbconnect_13_1/lib/python3.10/site-packages/databricks/sdk/core.py:493, in Config.init(self, credentials_provider, product, product_version, **kwargs)
491 self._set_inner_config(kwargs)
492 self._load_from_env()
--> 493 self._known_file_config_loader()
494 self._fix_host_if_needed()
495 self._validate()
File ~/Documents/Coding/spark_connect_tests/20230615_DBConnect_Test_Oauth/venv_dbconnect_13_1/lib/python3.10/site-packages/databricks/sdk/core.py:732, in Config._known_file_config_loader(self)
730 return
731 ini_file = configparser.ConfigParser()
--> 732 ini_file.read(config_path)
733 profile = self.profile
734 has_explicit_profile = self.profile is not None
File ~/miniconda3/lib/python3.10/configparser.py:698, in RawConfigParser.read(self, filenames, encoding)
696 try:
697 with open(filename, encoding=encoding) as fp:
--> 698 self._read(fp, filename)
699 except OSError:
700 continue
File ~/miniconda3/lib/python3.10/configparser.py:1086, in RawConfigParser._read(self, fp, fpname)
1084 # no section header in the file?
1085 elif cursect is None:
-> 1086 raise MissingSectionHeaderError(fpname, lineno, line)
1087 # an option line?
1088 else:
1089 mo = self._optcre.match(value)
MissingSectionHeaderError: File contains no section headers.
file: PosixPath('/Users/vladislav.manticlugo/.databrickscfg'), line: 1
'host = https://e2-dogfood.staging.cloud.databricks.com\n'
The text was updated successfully, but these errors were encountered: