DataprocSparkSession package in python error - "RuntimeError: Error while creating Dataproc Session"

0 views
Skip to first unread message

Siddiq

unread,
Oct 2, 2025, 4:20:13 AM (3 days ago) Oct 2
to Google Cloud Dataproc Discussions
Hi,

I am using below code to create Dataproc Spark Session to run a job

```
from google.cloud.dataproc_spark_connect import DataprocSparkSession
from google.cloud.dataproc_v1 import Session

session = Session()

session.environment_config.execution_config.subnetwork_uri = '<subnet>'
session.runtime_config.version = '2.3'
spark = DataprocSparkSession.builder.appName("CustomSparkSession").dataprocSessionConfig(session).getOrCreate()
```

I am getting an error as mentioned below

" RuntimeError: Error while creating Dataproc Session"

What are the steps that are missing and what is the solution to proceed to fix it? Thank you in advance

I have tried creating cluster on console but that dint work with session creation either. I would like to know the error details and solution to proceed with session creation.

I will be happy to hear back and appreciate your consideration.

Best Regards,
Siddiq Syed
Reply all
Reply to author
Forward
0 new messages