Discussion:
[libtorrent] RuntimeWarning: to-Python converter for
Ronald Degmar
2017-01-06 03:52:50 UTC
Permalink
Hello,

I installed boost and libtorrent in Python virtualenv. Then I installed
Deluge.
This works fine. I want to do new python code and what is reallly annoying
is the fact I get a warning everytime I import libtorrent.
See:

***@systorzo:~/AcademicTorrents$ source bin/activate
(AcademicTorrents) ***@systorzo:~/AcademicTorrents$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import libtorrent as lt
__main__:1: RuntimeWarning: to-Python converter for
boost::shared_ptr<libtorrent::alert> already registered; second conversion
method ignored.
lt.version
'1.0.10.0'
How do I get rid of this warning,

Best,

Ronald Barrios
Calum Lind
2017-01-06 11:07:13 UTC
Permalink
https://github.com/arvidn/libtorrent/issues/1217
Post by Ronald Degmar
Hello,
I installed boost and libtorrent in Python virtualenv. Then I installed
Deluge.
This works fine. I want to do new python code and what is reallly annoying
is the fact I get a warning everytime I import libtorrent.
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import libtorrent as lt
__main__:1: RuntimeWarning: to-Python converter for
boost::shared_ptr<libtorrent::alert> already registered; second conversion
method ignored.
lt.version
'1.0.10.0'
How do I get rid of this warning,
Best,
Ronald Barrios
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
Ronald Degmar
2017-01-18 06:19:48 UTC
Permalink
Hi Calum,

I'm working hard on this. I read your previous answers with the links you
provided. I can't figure it out yet how to change the source code in order
to get rid of the warning. I'd rather not modify it. Is it possible to work
with b2 or bjam in libtorrent, get the same configure options as below, and
get rid of the warning?

*Libtorrent:*

*./configure --enable-python-binding --disable-dependency-tracking
--disable-silent-rules PYTHON=${PY}/python --prefix=${AT_HOME}
--with-boost=${AT_HOME} --with-libiconv --with-boost-python=boost_python
BOOST_ROOT=\"${PKG}/${_BOOST_DIR}\""*

I mean possibly to give standalone features for boost, libtorrent, and
deluge in python virtual env.

I tested docker images in Gitlab for Ubuntu, Debian, Fedora and Centos.
Deluge installation passed successfully in ubuntu and debian despite of the
warning, whereas it crashed in Centos and Fedora while importing libtorrent:

*/builds/ronald.degmar/ATdev/packages/deluge-1.3.13/deluge/_libtorrent.py:59:
RuntimeWarning: to-Python converter for
boost::shared_ptr<libtorrent::alert> already registered; second conversion
method ignored.*
* import libtorrent as lt*
*invalid command name ''*

Ronald
Post by Calum Lind
https://github.com/arvidn/libtorrent/issues/1217
Post by Ronald Degmar
Hello,
I installed boost and libtorrent in Python virtualenv. Then I installed
Deluge.
This works fine. I want to do new python code and what is reallly
annoying
Post by Ronald Degmar
is the fact I get a warning everytime I import libtorrent.
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import libtorrent as lt
__main__:1: RuntimeWarning: to-Python converter for
boost::shared_ptr<libtorrent::alert> already registered; second
conversion
Post by Ronald Degmar
method ignored.
lt.version
'1.0.10.0'
How do I get rid of this warning,
Best,
Ronald Barrios
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
Calum Lind
2017-01-18 07:50:47 UTC
Permalink
It's actually been fixed now
Post by Ronald Degmar
Hi Calum,
I'm working hard on this. I read your previous answers with the links you
provided. I can't figure it out yet how to change the source code in order
to get rid of the warning. I'd rather not modify it. Is it possible to work
with b2 or bjam in libtorrent, get the same configure options as below, and
get rid of the warning?
*Libtorrent:*
*./configure --enable-python-binding --disable-dependency-tracking
--disable-silent-rules PYTHON=${PY}/python --prefix=${AT_HOME}
--with-boost=${AT_HOME} --with-libiconv --with-boost-python=boost_python
BOOST_ROOT=\"${PKG}/${_BOOST_DIR}\""*
I mean possibly to give standalone features for boost, libtorrent, and
deluge in python virtual env.
I tested docker images in Gitlab for Ubuntu, Debian, Fedora and Centos.
Deluge installation passed successfully in ubuntu and debian despite of the
*/builds/ronald.degmar/ATdev/packages/deluge-1.3.13/deluge/
RuntimeWarning: to-Python converter for
boost::shared_ptr<libtorrent::alert> already registered; second conversion
method ignored.*
* import libtorrent as lt*
*invalid command name ''*
Ronald
Post by Calum Lind
https://github.com/arvidn/libtorrent/issues/1217
Post by Ronald Degmar
Hello,
I installed boost and libtorrent in Python virtualenv. Then I installed
Deluge.
This works fine. I want to do new python code and what is reallly
annoying
Post by Ronald Degmar
is the fact I get a warning everytime I import libtorrent.
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import libtorrent as lt
__main__:1: RuntimeWarning: to-Python converter for
boost::shared_ptr<libtorrent::alert> already registered; second
conversion
Post by Ronald Degmar
method ignored.
lt.version
'1.0.10.0'
How do I get rid of this warning,
Best,
Ronald Barrios
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
Ronald Degmar
2017-01-18 18:58:39 UTC
Permalink
That's amazing Calum! Do you mean a new release, say libtorrent 1.0.11?

Ronald
Post by Calum Lind
It's actually been fixed now
Post by Ronald Degmar
Hi Calum,
I'm working hard on this. I read your previous answers with the links you
provided. I can't figure it out yet how to change the source code in
order
Post by Ronald Degmar
to get rid of the warning. I'd rather not modify it. Is it possible to
work
Post by Ronald Degmar
with b2 or bjam in libtorrent, get the same configure options as below,
and
Post by Ronald Degmar
get rid of the warning?
*Libtorrent:*
*./configure --enable-python-binding --disable-dependency-tracking
--disable-silent-rules PYTHON=${PY}/python --prefix=${AT_HOME}
--with-boost=${AT_HOME} --with-libiconv --with-boost-python=boost_python
BOOST_ROOT=\"${PKG}/${_BOOST_DIR}\""*
I mean possibly to give standalone features for boost, libtorrent, and
deluge in python virtual env.
I tested docker images in Gitlab for Ubuntu, Debian, Fedora and Centos.
Deluge installation passed successfully in ubuntu and debian despite of
the
Post by Ronald Degmar
warning, whereas it crashed in Centos and Fedora while importing
*/builds/ronald.degmar/ATdev/packages/deluge-1.3.13/deluge/
RuntimeWarning: to-Python converter for
boost::shared_ptr<libtorrent::alert> already registered; second
conversion
Post by Ronald Degmar
method ignored.*
* import libtorrent as lt*
*invalid command name ''*
Ronald
Post by Calum Lind
https://github.com/arvidn/libtorrent/issues/1217
Post by Ronald Degmar
Hello,
I installed boost and libtorrent in Python virtualenv. Then I
installed
Post by Ronald Degmar
Post by Calum Lind
Post by Ronald Degmar
Deluge.
This works fine. I want to do new python code and what is reallly
annoying
Post by Ronald Degmar
is the fact I get a warning everytime I import libtorrent.
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
Post by Ronald Degmar
Post by Calum Lind
Post by Ronald Degmar
import libtorrent as lt
__main__:1: RuntimeWarning: to-Python converter for
boost::shared_ptr<libtorrent::alert> already registered; second
conversion
Post by Ronald Degmar
method ignored.
lt.version
'1.0.10.0'
How do I get rid of this warning,
Best,
Ronald Barrios
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
Ronald Degmar
2017-01-23 03:29:20 UTC
Permalink
Hi Calum,

Finally the problem is solved. I got rid of the warning. Solution was
simpler than I thought:

The following python code helped to suppress the warning:

*import warnings*
*with warnings.catch_warnings():*
* warnings.simplefilter("ignore")*
* import libtorrent as lt*
*print('Libtorrent Version Installed is: ' + lt.version*)


Ouput is as follows:

*Libtorrent Version Installed is: 1.0.10.0*

As you see there are no warnings. As speaking about deluge, installation
failed in Centos and Fedora because of an issue I had with
pyhon-setuptools. It was not because of libtorrent.

Just a quick question. Is there a test I can run for libtorrent to check
library is fully functional and working OK? I haven't gotten around that
yet. What would be the best way to do it?

Regards,

Ronald Barrios
Post by Calum Lind
It's actually been fixed now
Post by Ronald Degmar
Hi Calum,
I'm working hard on this. I read your previous answers with the links you
provided. I can't figure it out yet how to change the source code in
order
Post by Ronald Degmar
to get rid of the warning. I'd rather not modify it. Is it possible to
work
Post by Ronald Degmar
with b2 or bjam in libtorrent, get the same configure options as below,
and
Post by Ronald Degmar
get rid of the warning?
*Libtorrent:*
*./configure --enable-python-binding --disable-dependency-tracking
--disable-silent-rules PYTHON=${PY}/python --prefix=${AT_HOME}
--with-boost=${AT_HOME} --with-libiconv --with-boost-python=boost_python
BOOST_ROOT=\"${PKG}/${_BOOST_DIR}\""*
I mean possibly to give standalone features for boost, libtorrent, and
deluge in python virtual env.
I tested docker images in Gitlab for Ubuntu, Debian, Fedora and Centos.
Deluge installation passed successfully in ubuntu and debian despite of
the
Post by Ronald Degmar
*/builds/ronald.degmar/ATdev/packages/deluge-1.3.13/deluge/
RuntimeWarning: to-Python converter for
boost::shared_ptr<libtorrent::alert> already registered; second
conversion
Post by Ronald Degmar
method ignored.*
* import libtorrent as lt*
*invalid command name ''*
Ronald
Post by Calum Lind
https://github.com/arvidn/libtorrent/issues/1217
Post by Ronald Degmar
Hello,
I installed boost and libtorrent in Python virtualenv. Then I
installed
Post by Ronald Degmar
Post by Calum Lind
Post by Ronald Degmar
Deluge.
This works fine. I want to do new python code and what is reallly
annoying
Post by Ronald Degmar
is the fact I get a warning everytime I import libtorrent.
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
Post by Ronald Degmar
Post by Calum Lind
Post by Ronald Degmar
import libtorrent as lt
__main__:1: RuntimeWarning: to-Python converter for
boost::shared_ptr<libtorrent::alert> already registered; second
conversion
Post by Ronald Degmar
method ignored.
lt.version
'1.0.10.0'
How do I get rid of this warning,
Best,
Ronald Barrios
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
Calum Lind
2017-01-23 10:43:41 UTC
Permalink
Thanks for the update, I knew it would be possible to hide the warning but
I knew it wouldn't fix it so didn't bother :)

To test if libtorrent is available for Deluge, the python import and
version check will suffice.

To test libtorrent itself you would build and run with the included tests.
`./configure --enable-tests`
Post by Ronald Degmar
Hi Calum,
Finally the problem is solved. I got rid of the warning. Solution was
*import warnings*
*with warnings.catch_warnings():*
* warnings.simplefilter("ignore")*
* import libtorrent as lt*
*print('Libtorrent Version Installed is: ' + lt.version*)
*Libtorrent Version Installed is: 1.0.10.0*
As you see there are no warnings. As speaking about deluge, installation
failed in Centos and Fedora because of an issue I had with
pyhon-setuptools. It was not because of libtorrent.
Just a quick question. Is there a test I can run for libtorrent to check
library is fully functional and working OK? I haven't gotten around that
yet. What would be the best way to do it?
Regards,
Ronald Barrios
Post by Calum Lind
It's actually been fixed now
Post by Ronald Degmar
Hi Calum,
I'm working hard on this. I read your previous answers with the links
you
Post by Calum Lind
Post by Ronald Degmar
provided. I can't figure it out yet how to change the source code in
order
Post by Ronald Degmar
to get rid of the warning. I'd rather not modify it. Is it possible to
work
Post by Ronald Degmar
with b2 or bjam in libtorrent, get the same configure options as below,
and
Post by Ronald Degmar
get rid of the warning?
*Libtorrent:*
*./configure --enable-python-binding --disable-dependency-tracking
--disable-silent-rules PYTHON=${PY}/python --prefix=${AT_HOME}
--with-boost=${AT_HOME} --with-libiconv --with-boost-python=boost_
python
Post by Calum Lind
Post by Ronald Degmar
BOOST_ROOT=\"${PKG}/${_BOOST_DIR}\""*
I mean possibly to give standalone features for boost, libtorrent, and
deluge in python virtual env.
I tested docker images in Gitlab for Ubuntu, Debian, Fedora and Centos.
Deluge installation passed successfully in ubuntu and debian despite of
the
Post by Ronald Degmar
*/builds/ronald.degmar/ATdev/packages/deluge-1.3.13/deluge/
RuntimeWarning: to-Python converter for
boost::shared_ptr<libtorrent::alert> already registered; second
conversion
Post by Ronald Degmar
method ignored.*
* import libtorrent as lt*
*invalid command name ''*
Ronald
Post by Calum Lind
https://github.com/arvidn/libtorrent/issues/1217
Post by Ronald Degmar
Hello,
I installed boost and libtorrent in Python virtualenv. Then I
installed
Post by Ronald Degmar
Post by Calum Lind
Post by Ronald Degmar
Deluge.
This works fine. I want to do new python code and what is reallly
annoying
Post by Ronald Degmar
is the fact I get a warning everytime I import libtorrent.
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
Post by Ronald Degmar
Post by Calum Lind
Post by Ronald Degmar
import libtorrent as lt
__main__:1: RuntimeWarning: to-Python converter for
boost::shared_ptr<libtorrent::alert> already registered; second
conversion
Post by Ronald Degmar
method ignored.
lt.version
'1.0.10.0'
How do I get rid of this warning,
Best,
Ronald Barrios
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
Loading...