New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime warning, then importing python libtorrent module (RC_1_1) #1217
Comments
A little research turned up this project encountering the same issue and seems to due to boost version differences. |
Maybe this info can be useful: |
iirc, the underlying problem is that different version of boost.python or perhaps when building against different versions of python (2 vs. 3) has different behavior here. A while ago I spent quite some time trying to resolve this. as far as I know, at least I got it to work everywhere. However, the long term solution is to get rid of the |
@barmalej2 What did you think about it? I don't like the idea of changing the RC_1_1 api to solve this issue. And it would may be take more effort than switching your python scripts to libtorrent 1.2. |
The problem here is why is this occuring only in certain Linux configurations... I.e. I don't see this on my Ubuntu systems but iirc it's seen on Arch |
I would guess because on the seen Arch system there was a boost version difference. But I don't know. |
would it make sense to remove the problematic alert-binding for the upcoming RC_1_1 release? That way at least some other deprecated functions could be preserved |
It seems this is occurring with boost >=1.61 as I can replicate this on Ubuntu Yaketty. @arvidn did you see this workaround that There are two instances of
Also the boost version check doesn't exist in torrent_info.cpp so is the usage in alert.cpp correct? |
For Boost >=1.60 the following warning is output importing libtorrent in Python: RuntimeWarning: to-Python converter for boost::shared_ptrlibtorrent::alert already registered; second conversion method ignored.
This fix checks for existing registered pointers for alert so that Boost does not output the following warning when importing libtorrent in Python: > RuntimeWarning: to-Python converter for boost::shared_ptrlibtorrent::alert already registered; second conversion method ignored.
This fix checks for existing registered pointers for alert so that Boost does not output the following warning when importing libtorrent in Python: > RuntimeWarning: to-Python converter for boost::shared_ptrlibtorrent::alert already registered; second conversion method ignored.
Thank you guys for your efforts and time spending to resolve this. Tested with latest libtorrent-1.1.2_git3b359ab (RC_1_1) and boost 1.63.0. No more runtime warnings. Closing this issue. |
libtorrent version (or branch):RC_1_1 git branch
boost version: 1.61.0
python version: 2.7.12
platform/architecture: armv5tel GNU/Linux, kernel 2.6.31.8
compiler and compiler version: gcc 4.9.2,
Step to reproduce case. Import python libtorrent:
python -c "import libtorrent; print libtorrent.version"
Expected output is only libtorrent version.
Actual output is:
The text was updated successfully, but these errors were encountered: