You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-45783][PYTHON][CONNECT] Improve error messages when Spark Connect mode is enabled but remote URL is not set
### What changes were proposed in this pull request?
This PR improves the error messages when `SPARK_CONNECT_MODE_ENABLED` is defined but neither `spark.remote` option nor the `SPARK_REMOTE` env var is set.
### Why are the changes needed?
To improve the error message. Currently the error looks like a bug:
```
url = opts.get("spark.remote", os.environ.get("SPARK_REMOTE"))
> if url.startswith("local"):
E AttributeError: 'NoneType' object has no attribute 'startswith'
```
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
New unit test
### Was this patch authored or co-authored using generative AI tooling?
No
Closes#43653 from allisonwang-db/spark-45783-fix-url-err.
Authored-by: allisonwang-db <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
0 commit comments