From dev-return-54618-archive-asf-public=cust-asf.ponee.io@thrift.apache.org Fri Jan 4 04:10:12 2019 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 4AACF18072F for ; Fri, 4 Jan 2019 04:10:11 +0100 (CET) Received: (qmail 3243 invoked by uid 500); 4 Jan 2019 03:10:10 -0000 Mailing-List: contact dev-help@thrift.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@thrift.apache.org Delivered-To: mailing list dev@thrift.apache.org Received: (qmail 2582 invoked by uid 99); 4 Jan 2019 03:10:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jan 2019 03:10:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 2420B180D90 for ; Fri, 4 Jan 2019 03:10:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 2BDZg1pvG4EU for ; Fri, 4 Jan 2019 03:10:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 109D25FB73 for ; Fri, 4 Jan 2019 03:10:05 +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 C4EB5E2658 for ; Fri, 4 Jan 2019 03:10:03 +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 B7AF925550 for ; Fri, 4 Jan 2019 03:10:02 +0000 (UTC) Date: Fri, 4 Jan 2019 03:10:02 +0000 (UTC) From: "James E. King III (JIRA)" To: dev@thrift.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (THRIFT-4089) Several issues with generated Python code: TFrozenDict, _fast_encode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/THRIFT-4089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James E. King III closed THRIFT-4089. ------------------------------------- This issue was resolved without a fixVersion but was not closed - closing. > Several issues with generated Python code: TFrozenDict, _fast_encode > -------------------------------------------------------------------- > > Key: THRIFT-4089 > URL: https://issues.apache.org/jira/browse/THRIFT-4089 > Project: Thrift > Issue Type: Bug > Components: Python - Compiler > Affects Versions: 0.10.0 > Environment: Python 2.7, 3.5. OS-X > Reporter: Manasi Vartak > Priority: Major > > When you generate Python sources for a simple thrift file (e.g. Thrift tutorial from https://thrift.apache.org/tutorial/py will also repro erros), errors are thrown while running the PythonServer and PythonClient. > 1. When running the vanilla PythonServer, I get the following error: > File "gen-py/shared/SharedService.py", line 9, in > from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException > ImportError: cannot import name TFrozenDict > I see this error consistently for all generated thrift files. The error disappears on removing TFrozenDict from the generated files (it is not used anywhere in the file). > 2. When running the vanilla PythonClient (the server is now running after the above fix), I get the following error: > File "PythonClient.py", line 51, in main > client.ping() > File "gen-py/tutorial/Calculator.py", line 73, in ping > self.send_ping() > File "gen-py/tutorial/Calculator.py", line 79, in send_ping > args.write(self._oprot) > File "gen-py/tutorial/Calculator.py", line 297, in write > if oprot._fast_encode is not None and self.thrift_spec is not None: > AttributeError: TBinaryProtocol instance has no attribute '_fast_encode' > I am not sure why this error is being thrown/what can be done to fix it. > These two errors, and mainly the latter one, are rendering the Server/Client un-usable. Is this a known issue? And how do you recommend working around it? -- This message was sent by Atlassian JIRA (v7.6.3#76005)