Abacn commented on code in PR #22730:
URL: https://github.com/apache/beam/pull/22730#discussion_r948045385


##########
sdks/python/apache_beam/runners/portability/local_job_service.py:
##########
@@ -184,7 +185,11 @@ def __init__(
       control_address,
       provision_info,
       worker_id=None):
-    self._worker_command_line = worker_command_line
+    if sys.platform == 'win32' and isinstance(worker_command_line, bytes):
+      # Fix subprocess.Popen not support bytes args
+      self._worker_command_line = worker_command_line.decode()

Review Comment:
   I believe so, inside the sdk the bytes are encoded here with utf-8:
   
https://github.com/apache/beam/blob/60581e8b1b6e93889cce78542e99d1fea4105d54/sdks/python/apache_beam/transforms/environments.py#L729
   And decode utf-8 bytes should be safe as long as user not call it from 
elsewhere (e.g. a non utf-8 locale environment and run the subprocess worker 
manually, which should not be a normal use case).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to