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

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

                Author: ASF GitHub Bot
            Created on: 06/Nov/18 01:13
            Start Date: 06/Nov/18 01:13
    Worklog Time Spent: 10m 
      Work Description: ruoyu90 commented on a change in pull request #6953: 
[BEAM-5879 ] Make write_record() in tfrecordio.py py3 compatible
URL: https://github.com/apache/beam/pull/6953#discussion_r230969844
 
 

 ##########
 File path: sdks/python/apache_beam/io/tfrecordio.py
 ##########
 @@ -78,7 +78,10 @@ def _masked_crc32c(cls, value, 
crc32c_fn=_default_crc32c_fn):
       Masked crc32c checksum.
     """
 
-    crc = crc32c_fn(value)
+    if isinstance(value, bytes):
 
 Review comment:
   In python3, we cannot encode bytes so it will break if we go through the 
else path. Yeah that is a typo, thanks for reminding!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 162827)
    Time Spent: 0.5h  (was: 20m)

> TFRecordio not Py3 compatible
> -----------------------------
>
>                 Key: BEAM-5879
>                 URL: https://issues.apache.org/jira/browse/BEAM-5879
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>         Environment: python 3.5
>            Reporter: Ruoyu Liu
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Error when trying to write to file. Initial issue in line 103 in 
> io/tfrecordio.py, after making the content to bytes, there will be 
> segmentation fault when reading.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to