You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/09/12 01:12:00 UTC

[jira] [Work logged] (BEAM-8217) py3 sdk harness status server does not print thread stack

     [ https://issues.apache.org/jira/browse/BEAM-8217?focusedWorklogId=311100&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-311100 ]

ASF GitHub Bot logged work on BEAM-8217:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Sep/19 01:11
            Start Date: 12/Sep/19 01:11
    Worklog Time Spent: 10m 
      Work Description: angoenka commented on pull request #9551: [BEAM-8217] Encode str to bytes py3 in sdk harness status server
URL: https://github.com/apache/beam/pull/9551#discussion_r323521094
 
 

 ##########
 File path: sdks/python/apache_beam/runners/worker/sdk_worker_main.py
 ##########
 @@ -74,7 +74,7 @@ def do_GET(self):  # pylint: disable=invalid-name
         self.end_headers()
 
         for line in StatusServer.get_thread_dump():
-          self.wfile.write(line)
+          self.wfile.write(str.encode(line, 'UTF-8'))
 
 Review comment:
   1. Done
   2. Done
   3. checked with 3.5
   4. TODO
   
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 311100)
    Remaining Estimate: 0h
            Time Spent: 10m

> py3 sdk harness status server does not print thread stack
> ---------------------------------------------------------
>
>                 Key: BEAM-8217
>                 URL: https://issues.apache.org/jira/browse/BEAM-8217
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-harness
>            Reporter: Ankur Goenka
>            Priority: Blocker
>             Fix For: 2.16.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The calls are failing with 
> ----------------------------------------
> Exception happened during processing of request from ('127.0.0.1', 56106)
> Traceback (most recent call last):
>   File "/usr/lib/python3.6/socketserver.py", line 320, in _handle_request_noblock
>     self.process_request(request, client_address)
>   File "/usr/lib/python3.6/socketserver.py", line 351, in process_request
>     self.finish_request(request, client_address)
>   File "/usr/lib/python3.6/socketserver.py", line 364, in finish_request
>     self.RequestHandlerClass(request, client_address, self)
>   File "/usr/lib/python3.6/socketserver.py", line 724, in __init__
>     self.handle()
>   File "/usr/lib/python3.6/http/server.py", line 418, in handle
>     self.handle_one_request()
>   File "/usr/lib/python3.6/http/server.py", line 406, in handle_one_request
>     method()
>   File "a.py", line 70, in do_GET
>     self.wfile.write(line)
>   File "/usr/lib/python3.6/socketserver.py", line 803, in write
>     self._sock.sendall(b)
> TypeError: a bytes-like object is required, not 'str'



--
This message was sent by Atlassian Jira
(v8.3.2#803003)