[jira] [Commented] (THRIFT-4089) Several issues with generated Python code: TFrozenDict, _fast_encode
[ https://issues.apache.org/jira/browse/THRIFT-4089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15877461#comment-15877461 ] Manasi Vartak commented on THRIFT-4089: --- That was indeed the issue, thank you! > 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 > > 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 (v6.3.15#6346)
[jira] [Commented] (THRIFT-4089) Several issues with generated Python code: TFrozenDict, _fast_encode
[ https://issues.apache.org/jira/browse/THRIFT-4089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15865866#comment-15865866 ] Manasi Vartak commented on THRIFT-4089: --- Got it. Let me check on that. > 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 > > 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 (v6.3.15#6346)
[jira] [Commented] (THRIFT-4089) Several issues with generated Python code: TFrozenDict, _fast_encode
[ https://issues.apache.org/jira/browse/THRIFT-4089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15865827#comment-15865827 ] Aki Sukegawa commented on THRIFT-4089: -- [~mvartak] no, Thrift runtime. If you can locate Thrift.py you're importing, it should look like https://github.com/apache/thrift/blob/0.10.0/lib/py/src/Thrift.py if it is from correct version. TFrozenDict is in this file. > 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 > > 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 (v6.3.15#6346)
[jira] [Commented] (THRIFT-4089) Several issues with generated Python code: TFrozenDict, _fast_encode
[ https://issues.apache.org/jira/browse/THRIFT-4089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15865788#comment-15865788 ] Manasi Vartak commented on THRIFT-4089: --- Are you referring to the Python library? I tested with Python 3.5 as well, same issue. > 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 >Affects Versions: 0.10.0 > Environment: Python 2.7, 3.5. OS-X >Reporter: Manasi Vartak > > 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 (v6.3.15#6346)
[jira] [Commented] (THRIFT-4089) Several issues with generated Python code: TFrozenDict, _fast_encode
[ https://issues.apache.org/jira/browse/THRIFT-4089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15865568#comment-15865568 ] Aki Sukegawa commented on THRIFT-4089: -- Sounds like version mismatch between compiler and library: 0.10.0 compiler against older python lib. > 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 >Affects Versions: 0.10.0 > Environment: Python 2.7. OS-X >Reporter: Manasi Vartak > > 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 (v6.3.15#6346)