From commits-return-98525-archive-asf-public=cust-asf.ponee.io@beam.apache.org Fri Oct 12 16:33:03 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 4D638180660 for ; Fri, 12 Oct 2018 16:33:03 +0200 (CEST) Received: (qmail 63747 invoked by uid 500); 12 Oct 2018 14:33:02 -0000 Mailing-List: contact commits-help@beam.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@beam.apache.org Delivered-To: mailing list commits@beam.apache.org Received: (qmail 63738 invoked by uid 99); 12 Oct 2018 14:33:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2018 14:33:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id CE408C796F for ; Fri, 12 Oct 2018 14:33:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id zhD0CMlnuXCo for ; Fri, 12 Oct 2018 14:33:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 1C2EA5F20B for ; Fri, 12 Oct 2018 14:33:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id ABDFEE0F39 for ; Fri, 12 Oct 2018 14:33:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 22E3624DBD for ; Fri, 12 Oct 2018 14:33:00 +0000 (UTC) Date: Fri, 12 Oct 2018 14:33:00 +0000 (UTC) From: "Simon (JIRA)" To: commits@beam.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (BEAM-5628) Several VcfIO tests fail in Python 3 with TypeError: cannot use a string pattern on a bytes-like object MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/BEAM-5628?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16647= 969#comment-16647969 ]=20 Simon commented on BEAM-5628: ----------------------------- This error can be traced back to the _create_generator function (io/vcfio.p= y: line 318), where it is mentioned that PyVCF=C2=A0has explicit str() call= s when parsing INFO fields, which fails=C2=A0with UTF-8 decoded strings. Fo= r this reason, the line is encoded back to UTF-8 in the python2 version.=C2= =A0 Because removing the encoding step results in hanging of some tests, there = is a chance this relates to 5623. Does anyone have additional insights? > Several VcfIO tests fail in Python 3 with TypeError: cannot use a string= pattern on a bytes-like object > -------------------------------------------------------------------------= ------------------------------- > > Key: BEAM-5628 > URL: https://issues.apache.org/jira/browse/BEAM-5628 > Project: Beam > Issue Type: Sub-task > Components: sdk-py-core > Reporter: Valentyn Tymofieiev > Assignee: Simon > Priority: Major > > ERROR: test_read_after_splitting (apache_beam.io.vcfio_test.VcfSourceTest= ) > " > ---------------------------------------------------------------------- > Traceback (most recent call last): > File ""/usr/local/google/home/valentyn/projects/beam/clean_head/beam/s= dks/python/apache_beam/io/vcfio_test.py"", line 336, in test_read_after_spl= itting > ] split_records.extend(source_test_utils.read_from_source(*source_inf= o)) > ] File ""/usr/local/google/home/valentyn/projects/beam/clean_head/beam/= sdks/python/apache_beam/io/source_test_utils.py"", line 101, in read_from_s= ource > for value in reader: > File ""/usr/local/google/home/valentyn/projects/beam/clean_head/beam/s= dks/python/apache_beam/io/vcfio.py"", line 264, in read_records > for line in record_iterator: > File ""/usr/local/google/home/valentyn/projects/beam/clean_head/beam/s= dks/python/apache_beam/io/vcfio.py"", line 330, in __next__ > record =3D next(self._vcf_reader) > File ""/usr/local/google/home/valentyn/projects/beam/clean_head/beam/s= dks/python/target/.tox/py3/lib/python3.5/site-packages/vcf/parser.py"", lin= e 543, in __next__ > row =3D self._row_pattern.split(line.rstrip()) > TypeError: cannot use a string pattern on a bytes-like object > " -- This message was sent by Atlassian JIRA (v7.6.3#76005)