From 512b52a2b234fd2248b4ab86173a08a59c9ae175 Mon Sep 17 00:00:00 2001 From: Yi Hu Date: Wed, 21 Aug 2024 17:06:53 -0400 Subject: [PATCH] Better error when Python xlang download jar not available (#32269) * Better error when Python xlang download jar not available * address comment --- sdks/python/apache_beam/utils/subprocess_server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdks/python/apache_beam/utils/subprocess_server.py b/sdks/python/apache_beam/utils/subprocess_server.py index b8668c2b61b0c..944c12625d7ce 100644 --- a/sdks/python/apache_beam/utils/subprocess_server.py +++ b/sdks/python/apache_beam/utils/subprocess_server.py @@ -385,7 +385,8 @@ def local_jar(cls, url, cache_dir=None): os.rename(cached_jar + '.tmp', cached_jar) except URLError as e: raise RuntimeError( - 'Unable to fetch remote job server jar at %s: %s' % (url, e)) + f'Unable to fetch remote job server jar at {url}: {e}. If no ' + f'Internet access at runtime, stage the jar at {cached_jar}') return cached_jar @classmethod