Discussion:
Help with generating Python 3 code
Amit Saha
2017-10-04 06:32:25 UTC
Permalink
Hi all,

I am attempting to generate Python3 code as follows, but haven't been able
to. This is a dump of the relevant information:

I have a git clone of the source and then did:

$ ./configure --with-java=false --with-cpp=false --with-lua=false
--with-ruby=false --with-dart=false --with-D=false
...
Building Python Library ...... : yes
Building Py3 Library ......... : yes
...
Python Library:
Using Python .............. : /usr/bin/python
Using Python version ...... : Python 2.7.12
Using Python3 ............. : /usr/bin/python3
Using Python3 version ..... : Python 3.5.2
Using trial ............... : /usr/bin/trial

...
$ make
$ make install

$ thrift -strict -r --gen py:py3 tutorial.thrift
[FAILURE:generation:1] Error: unknown option py:py3

Would appreciate any help.

Best Wishes,
Amit.
Amit Saha
2017-10-04 06:46:06 UTC
Permalink
Post by Amit Saha
Hi all,
I am attempting to generate Python3 code as follows, but haven't been able
$ ./configure --with-java=false --with-cpp=false --with-lua=false
--with-ruby=false --with-dart=false --with-D=false
...
Building Python Library ...... : yes
Building Py3 Library ......... : yes
...
Using Python .............. : /usr/bin/python
Using Python version ...... : Python 2.7.12
Using Python3 ............. : /usr/bin/python3
Using Python3 version ..... : Python 3.5.2
Using trial ............... : /usr/bin/trial
...
$ make
$ make install
$ thrift -strict -r --gen py:py3 tutorial.thrift
[FAILURE:generation:1] Error: unknown option py:py3
Sorry, that should have been `py:python3` (as per
https://issues.apache.org/jira/browse/THRIFT-1857) but i get the same
result.
Post by Amit Saha
Amit.
Jens Geyer
2017-10-04 06:56:01 UTC
Permalink
There is no such option, really. Try

thrift --help



Sent from mobile device, please ignore spelling mistakes.
________________________________
Von: Amit Saha
Gesendet: 04.10.2017 08:46
An: ***@thrift.apache.org
Betreff: Re: Help with generating Python 3 code
Post by Amit Saha
Hi all,
I am attempting to generate Python3 code as follows, but haven't been able
$ ./configure --with-java=false --with-cpp=false --with-lua=false
--with-ruby=false --with-dart=false --with-D=false
...
Building Python Library ...... : yes
Building Py3 Library ......... : yes
...
Using Python .............. : /usr/bin/python
Using Python version ...... : Python 2.7.12
Using Python3 ............. : /usr/bin/python3
Using Python3 version ..... : Python 3.5.2
Using trial ............... : /usr/bin/trial
...
$ make
$ make install
$ thrift -strict -r --gen py:py3 tutorial.thrift
[FAILURE:generation:1] Error: unknown option py:py3
Sorry, that should have been `py:python3` (as per
https://issues.apache.org/jira/browse/THRIFT-1857) but i get the same
result.
Post by Amit Saha
Amit.
Amit Saha
2017-10-04 06:57:49 UTC
Permalink
Post by Jens Geyer
There is no such option, really. Try
thrift --help
I did look at it, but couldn't see any mention of python3 or py3. Referred
to https://issues.apache.org/jira/browse/THRIFT-1857 as well.
Post by Jens Geyer
Sent from mobile device, please ignore spelling mistakes.
________________________________
Von: Amit Saha
Gesendet: 04.10.2017 08:46
Betreff: Re: Help with generating Python 3 code
Post by Amit Saha
Hi all,
I am attempting to generate Python3 code as follows, but haven't been
able
Post by Amit Saha
$ ./configure --with-java=false --with-cpp=false --with-lua=false
--with-ruby=false --with-dart=false --with-D=false
...
Building Python Library ...... : yes
Building Py3 Library ......... : yes
...
Using Python .............. : /usr/bin/python
Using Python version ...... : Python 2.7.12
Using Python3 ............. : /usr/bin/python3
Using Python3 version ..... : Python 3.5.2
Using trial ............... : /usr/bin/trial
...
$ make
$ make install
$ thrift -strict -r --gen py:py3 tutorial.thrift
[FAILURE:generation:1] Error: unknown option py:py3
Sorry, that should have been `py:python3` (as per
https://issues.apache.org/jira/browse/THRIFT-1857) but i get the same
result.
Post by Amit Saha
Amit.
Jens Geyer
2017-10-04 08:56:35 UTC
Permalink
And what are your conclusions?

Sent from mobile device, please ignore spelling mistakes.
________________________________
Von: Amit Saha
Gesendet: 04.10.2017 08:58
An: ***@thrift.apache.org
Betreff: Re: Help with generating Python 3 code
Post by Jens Geyer
There is no such option, really. Try
thrift --help
I did look at it, but couldn't see any mention of python3 or py3. Referred
to https://issues.apache.org/jira/browse/THRIFT-1857 as well.
Post by Jens Geyer
Sent from mobile device, please ignore spelling mistakes.
________________________________
Von: Amit Saha
Gesendet: 04.10.2017 08:46
Betreff: Re: Help with generating Python 3 code
Post by Amit Saha
Hi all,
I am attempting to generate Python3 code as follows, but haven't been
able
Post by Amit Saha
$ ./configure --with-java=false --with-cpp=false --with-lua=false
--with-ruby=false --with-dart=false --with-D=false
...
Building Python Library ...... : yes
Building Py3 Library ......... : yes
...
Using Python .............. : /usr/bin/python
Using Python version ...... : Python 2.7.12
Using Python3 ............. : /usr/bin/python3
Using Python3 version ..... : Python 3.5.2
Using trial ............... : /usr/bin/trial
...
$ make
$ make install
$ thrift -strict -r --gen py:py3 tutorial.thrift
[FAILURE:generation:1] Error: unknown option py:py3
Sorry, that should have been `py:python3` (as per
https://issues.apache.org/jira/browse/THRIFT-1857) but i get the same
result.
Post by Amit Saha
Amit.
Amit Saha
2017-10-04 08:59:59 UTC
Permalink
Post by Jens Geyer
And what are your conclusions?
I wrote my conclusion in my original + followip post. That i am not able to
get it working.
Post by Jens Geyer
Sent from mobile device, please ignore spelling mistakes.
________________________________
Von: Amit Saha
Gesendet: 04.10.2017 08:58
Betreff: Re: Help with generating Python 3 code
Post by Jens Geyer
There is no such option, really. Try
thrift --help
I did look at it, but couldn't see any mention of python3 or py3. Referred
to https://issues.apache.org/jira/browse/THRIFT-1857 as well.
Post by Jens Geyer
Sent from mobile device, please ignore spelling mistakes.
________________________________
Von: Amit Saha
Gesendet: 04.10.2017 08:46
Betreff: Re: Help with generating Python 3 code
Post by Amit Saha
Hi all,
I am attempting to generate Python3 code as follows, but haven't been
able
Post by Amit Saha
$ ./configure --with-java=false --with-cpp=false --with-lua=false
--with-ruby=false --with-dart=false --with-D=false
...
Building Python Library ...... : yes
Building Py3 Library ......... : yes
...
Using Python .............. : /usr/bin/python
Using Python version ...... : Python 2.7.12
Using Python3 ............. : /usr/bin/python3
Using Python3 version ..... : Python 3.5.2
Using trial ............... : /usr/bin/trial
...
$ make
$ make install
$ thrift -strict -r --gen py:py3 tutorial.thrift
[FAILURE:generation:1] Error: unknown option py:py3
Sorry, that should have been `py:python3` (as per
https://issues.apache.org/jira/browse/THRIFT-1857) but i get the same
result.
Post by Amit Saha
Amit.
Amit Saha
2017-10-06 08:08:21 UTC
Permalink
Just for anyone finding this post, it turns out the python generator is
generating Python 2/3 code from what it seems so far. No need to specify
any additional option.
Post by Amit Saha
Post by Jens Geyer
And what are your conclusions?
I wrote my conclusion in my original + followip post. That i am not able
to get it working.
Post by Jens Geyer
Sent from mobile device, please ignore spelling mistakes.
________________________________
Von: Amit Saha
Gesendet: 04.10.2017 08:58
Betreff: Re: Help with generating Python 3 code
Post by Jens Geyer
There is no such option, really. Try
thrift --help
I did look at it, but couldn't see any mention of python3 or py3. Referred
to https://issues.apache.org/jira/browse/THRIFT-1857 as well.
Post by Jens Geyer
Sent from mobile device, please ignore spelling mistakes.
________________________________
Von: Amit Saha
Gesendet: 04.10.2017 08:46
Betreff: Re: Help with generating Python 3 code
Post by Amit Saha
Hi all,
I am attempting to generate Python3 code as follows, but haven't been
able
Post by Amit Saha
$ ./configure --with-java=false --with-cpp=false --with-lua=false
--with-ruby=false --with-dart=false --with-D=false
...
Building Python Library ...... : yes
Building Py3 Library ......... : yes
...
Using Python .............. : /usr/bin/python
Using Python version ...... : Python 2.7.12
Using Python3 ............. : /usr/bin/python3
Using Python3 version ..... : Python 3.5.2
Using trial ............... : /usr/bin/trial
...
$ make
$ make install
$ thrift -strict -r --gen py:py3 tutorial.thrift
[FAILURE:generation:1] Error: unknown option py:py3
Sorry, that should have been `py:python3` (as per
https://issues.apache.org/jira/browse/THRIFT-1857) but i get the same
result.
Post by Amit Saha
Amit.
Loading...