.2 'This seems to be an old Python version which does not support detecting the filesystem encoding. Assuming .
See also:
- Printable version
- Rss Feed
- Last Updated: Feb/18/2008
{ 74 comments… read them below or add one }
Fantastic post… deserves tons of comments.. a massive help :)
Very helpul thanks!
Try ctorrent, a c++ command line bt client.
Looking for a better command line client can select files from the torrent for downloading.
Okay it looks good to me thanks for pointing out it :)
1) Get it at URL
2) Read INSTALL file :) for installation.
Also use btdownloadheadless.py (or curses) by itself to get the help output. Various command switches are taken. –max_upload_rate $INT –super-seeder $BOOLEAN – etc.
Thanks for this! Torrents thru SSH == heaven :)
Very nice post, but i screwd it somehow :(
Here’s the error i got:
Traceback (most recent call last):
File “/usr/bin/btdownloadheadless.py”, line 24, in ?
from BitTorrent.download import Feedback, Multitorrent
ImportError: No module named BitTorrent.download
> ImportError: No module named BitTorrent.download
I had that error on my box and found this problem/solution:
- /usr/lib/python a link to /usr/lib/python2.2
- /usr/lib/python2.3 had been created during rpm install of BitTorrent and contained nothing but a dir /site-packages (belonging to BitTorrent
- copying that directory to /python2.2 fixed the problem
have fun
Cool, thanks for posting solution too. I’m sure it will help others who gets stuck up with such errors :D
Your post helps a lot.
I have tried using the command ./btdownloadcurse.py. I found that it is not possible to have it run as a background job ! Why ? Is it possible to run bittorrent jobs, either d/l or u/l in background ?
Panya
Try no nohup command as follows:
nohup ./btdownloadheadless.py some_file[222].torrent &
nohup run a command immune to hangups, with output to a non-tty i.e. it will run command even if you quit the session
Another question, I got a warning (guess it is not an error) saying that :
[13:57:00] Python failed to autodetect filesystem encoding. Using ‘ascii’ instead.
What should I do ?
You need to upgrade python version to avoid this warning. Once upgraded you should able to get rid of this problem
–
Rocky
This is just what I need… but.. I download the .deb file and dpkg -i btclientfile.deb and I can’t find btdownloadheadless.py
It should be in /usr/bin/ directory. Try as follows:
$ cd /usr/bin
$ ./btdownloadheadless.py path/to/file.torrent
You can also use following trick to find out path to btdownloadheadless.py
# dpkg –contents btclientfile.deb | grep btdownloadheadless.py
Hello
I’m getting following error I’m using /usr/bin/bittorrent-curses under Debian linux:
Traceback (most recent call last):
File “/usr/bin/bittorrent-curses”, line 17, in ?
from BitTorrent.platform import install_translation
ImportError: cannot import name install_translation
Any idea?
Upgrade your version to python2.4, try
apt-get install python2.4
Then execute curses interface as follows:
$ python2.4 /usr/bin/bittorrent-curses ‘/path/to/file.torrent’
Cool after upgrading it to python 2.4, it worked, thanks a lot :) Your site is worth a bookmark. Can u write about GUI BitTorrent clients …
Do you need to open up any ports specifically on the firewall?
Yup you need to open ports on firewall:
TCP/UDP 6881 to 6889 for bittorent client
If you have router based firewall then you need to enable port forwarding on router for above ports to your internal computes.
thanks was looking for both firewall rule and command line tool
Thx!!!
Installed on my dedicated :D
download rate: 55.7 KB/s
upload rate: 16.1 KB/s
share rating: 0.713 (19.1 MB up / 26.8 MB down)
seed status: 14 seen now, plus 2 distributed copies (3:99.6%, 4:96.5%, 5:85.9%)
peer status: 15 seen now
:DDDD
Wow nice speed :)
I can’t seem to get this to work. I keep getting:
Traceback (most recent call last):
File “/usr/bin/bittorrent-curses”, line 18, in ?
from BitTorrent.platform import install_translation
ImportError: No module named BitTorrent.platform
If I check the python version with python -V I get Python 2.4.2
I have tried running the bittorrent command as both python and python2.4 and get the same error in both cases.
In /usr/local/bin I can see 2 files:
python & python2.4 both with the same size and timestamp.
In /usr/lib I have a python2.2 directory and a python2.4 directory.
The python2.2 directory has a whole bunch of files in it, while the python2.4 directory only has a site-packages directory.
I have tried uninstalling and reinstalling both python2.4 and bittorrent with no success so far.
Any suggestions?
Run it as follows:
python2.4 /usr/bin/bittorrent-curses ‘/path/to/file.torrent’
OR
python2.4 /usr/bin/bittorrent-curses ‘’
>The python2.2 directory has a whole bunch of files in it, while the python2.4 directory only has a site-packages directory.
Hmm i have more than 500+ files in /usr/lib .. try to install python-all. If you are using Debian then it is really easy:
apt-get install python2.4
Above command should install all files.
Hi,
It works, if you have this:
-
File “/usr/bin/bittorrent-curses”, line 18, in ?
from BitTorrent.platform import install_translation
ImportError: No module named BitTorrent.platform
-
Just check if your /usr/bin/python is linked with /usr/bin/python2.4
if not do:
1/ rm /usr/bin/python
2/ ln -s /usr/bin/python2.3 /usr/bin/python
3/ Enjoy
JJ
dl speed: 150.1 KB/s ul speed: 19.8 KB/s sharing: 0.167 (27.5 MB up / 164.5 MB down) seeds: 64 seen now, plus 0 distributed copies(1:99.9%, 2:98.6%, 3:91.6%) peers: 16 seen now
sad thing is that utorrent over cable is faster at over 200 KB/s
How do I stop torrents? I mean I have torrents downloading but what do I do (in SSH) to stop that torrent? I can’t seem to get to a command line either, it just keeps showing the information of speeds, % complete etc…
Press q to exit/stop bittorrent client.
OR press CTRL + C to cancel command.
Otherwise login from other terminal (may be over ssh) and find out pid of bittorrent client and kill using kill command.
Hi there, and thank you for a nice page.
I’m getting:
File “/usr/bin/bittorrent-curses”, line 18, in ?
and yet am using python2.4, my python is linked to 2.4 and I’ve tried explicitly running it as 2.4 as well… still no joy.
Any other explanations?
Dan.
Hi Dan,
It seems that some problem exists there for Debian if you are looking for GUI client try out azureus bittorent java client. If you don’t wanna use GUI client then above method should work for you.
Try out:
python2.4 /usr/bin/bittorrent-curses ‘path/to/bottorent-file’
azureus
That is what I have been using :S
none of the /usr/bin/bittorrent* files run, all generate this error.
btdownloadgui however works fine, but I sometimes wish to start a transfer over ssh.
Dan.
Ok. I just try out latest .deb file from official site and you are right it is broken. But I was able to run it via source code. Try out following 4 command it should work on any Linux computer.
Download source code
wget
Untar code
tar -zxvf BitTorrent-4.4.0.tar.gz
Goto dirctory:
cd BitTorrent-4.4.00
Start GUI Client
./bittorrent
Start Console Client
./bittorrent-curses
Let me know if it works or not.
Thank you :)
I had found btdownloadcurses on my machine, that worked as well.
Note also that an alternative to nohup is screen. You can run a command with screen like:
screen btdownloadcurses
press ctrl+a then d to detach from the process
you can then regain control by issueing
screen -r
Dan.
How to close program running in screen? The bittorrent.
Press q to exit bittorent client. To exit screen command press CTRL+a+C
How to close the screen completely?
[root@server html]# screen -r
There are several suitable screens on:
11809.pts-0.server (Detached)
20081.pts-0.server (Attached)
11582.pts-0.server (Detached)
Type “screen [-d] -r [pid.]tty.host” to resume one of them.
Type command to resume screen:
screen -r -d 11809.pts-0.server
When i use screen bittorrent-curses ‘test.torrent’
I get [screen is terminating]..
How to fix this?
You need to first start screen session:
screen -S 1
Now start bittorent session:
bittorrent-curses ‘test.torrent’
You need to read man page of screen for more info and usage.
Hi,
I’d like to set up my console bittorrent to running only in some configured time. For example from 2 to 8 in the night. I now use cron ok no problem. But how to set up time how long launchmany-curses (I’m using it because I’ve a lot of torrent files) have to work ?
I know I can use kill but then on trackers connections isn’t well ended and I think there must be better way to achive this goal.
Greetings,
krutny
I got these messages, anyone can help me?
lw13n971:/usr/src# python2.4 /usr/bin/bittorrent-curses ‘/usr/src/test.torrent’
root : STDERR Traceback (most recent call last):
root : STDERR File “/usr/bin/bittorrent-curses”, line 31, in ?
root : STDERR from BitTorrent.MultiTorrent import MultiTorrent, TorrentAlreadyRunning
root : STDERR File “/usr/lib/python2.4/site-packages/BitTorrent/MultiTorrent.py”, line 25, in ?
root : STDERR from BitTorrent.Torrent import Feedback, Torrent
root : STDERR File “/usr/lib/python2.4/site-packages/BitTorrent/Torrent.py”, line 34, in ?
root : STDERR from BitTorrent.ConnectionManager import ConnectionManager
root : STDERR File “/usr/lib/python2.4/site-packages/BitTorrent/ConnectionManager.py”, line 22, in ?
root : STDERR from BitTorrent.RawServer_twisted import Handler
root : STDERR File “/usr/lib/python2.4/site-packages/BitTorrent/RawServer_twisted.py”, line 45, in ?
root : STDERR from twisted.python import threadable
root : STDERR ImportError: No module named twisted.python
lw13n971:/usr/src#
great page
i have managed to instal python2.4 on my redhat6.2 based qube3, but can’t install bittorrent as (i think) it can’t find the updated python
tantilising!
and ideas anyone?
If python2.4 is installed then you should able to use bittorent.
BTW, why you are using RedHat 6.x? It is better to get new version aka Fedora Core 5 or 4 or better try Debian/Ubentu Linux.
cool stuff
Thanks, excellent article.
I have a couple of doubts, though. I haven’t been able to resume downloading a previously stopped torrent.
I got this message, only once:
“These errors occurred during execution:
[10:56:02] Could not load fastresume data: Another program appears to have modified the file, or BitTorrent may have crashed last time it was run. Will perform full hash check.”
Do you have any tip for resuming? As it is now, every time I stop it I have to start all over again.
thanks, Emiliano
Just run same command it will automatically resume the job.
I get this error – Problem connecting to tracker – urlopen error 3, ‘Temporary failure in name resolution’
I’m searcing for a way to remotely control any bittorrent client by ssh, meaning that I can see the download progress, stop it, add another download, etc.
Is it possible with the official BitTorrent? Do you know any other torrent client that can do this?
Use screen utility to start multiple session.
You may also need to execute commands using nohup
How can i change the ports (6881 to 6889) that bittorrent are use?
Pass –minport –maxport option to change default port.
bittorrent-curses –minport 5000 –maxport 5100 ‘file.torrent’
any idea why I get this error: Problem connecting to tracker – urlopen error (105, ‘No buffer space available’
Thanks,
:(
can any one help me
root@nasser [~/Python-2.5]#-crypto >= 2
??
root@nasser [~/Python-2.5]# python -V
Python 2.5
can any onw tell me ?? how to solve this problem ?
Install python v2.4
Sorry .,
But after it’s work .. it gave me this messege
These errors occurred during execution:
[19:33:53] Could not load fastresume data: invalid literal for int(): 1167527459.0 Will perform full hash check.
[19:33:54] Aborting the torrent as it was rejected by the tracker while not connected to any peers. Message from the tracker: unregistered torrent
I looking for software can run in my server ( not my computer ). So I can download file using torrent in my server and then when it completes, I download to my computer.
Do not blame me if my idea is bad!:D
Help me please!
Thanks.
simplistic. awesome. thanks.
-sh-2.05b$ python2.4 /home/radon86/Download/BitTorrent-4.4.0/bittorrent-curses.py ‘Pirates_of_the_Caribbean.At_Worlds_End.TS.XViD_-_NL_Subs_srt_-^mininova.org^-.torrent’
——————————————————————————
| file: |
| size: |
| dest: |
| progress: |
| status: |
| dl speed: |
| ul speed: |
| sharing: |
| seeds: |
| peers: |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Traceback (most recent call last):———————————————
File “/home/radon86/Download/BitTorrent-4.4.0/bittorrent-curses.py”, line 445, in ?
curses_wrapper(dl.run)
File “/usr/local/lib/python2.4/curses/wrapper.py”, line 44, in wrapper
return func(stdscr, *args, **kwds)
File “/home/radon86/Download/BitTorrent-4.4.0/bittorrent-curses.py”, line 349, in run
self.d = CursesDisplayer(scrwin, self.errlist, self.doneflag, reread, ulrate)
File “/home/radon86/Download/BitTorrent-4.4.0/bittorrent-curses.py”, line 117, in __init__
curses.use_default_colors()
_curses.error: use_default_colors() returned ERR
-sh-2.05b$
——————–
help me please
now i have install python 2.4.4
when i use rpm command to install bitcomment it’s show
-sh-2.05b$ rpm -ivh BitTorrent-5.0.3-1-Python2.4.noarch.rpm
error: Failed dependencies:
/usr/bin/python2.4 is needed by BitTorrent-5.0.3-1
python >= 2.3 is needed by BitTorrent-5.0.3-1
python(abi) = 2.4 is needed by BitTorrent-5.0.3-1
python-crypto >= 2.0 is needed by BitTorrent-5.0.3-1
python-psyco is needed by BitTorrent-5.0.3-1
python-twisted >= 2.0 is needed by BitTorrent-5.0.3-1
python-zopeinterface is needed by BitTorrent-5.0.3-1
wxPython >= 2.6 is needed by BitTorrent-5.0.3-1
-sh-2.05b$
please slove my problem
I also have Python 2.4.4 and the only failed dependency is python-zopeinterface, which is needed by BitTorrent-5.0.7-1.noarch.
I have installed python-zope-interface which it seems is not the same thing. I have tried a python-zopeinterface from FC5 but does not work with my FC6.
Does anyone else have similar problems?
I want to run effectively a torrent daemon which I can take up and down as I please. However using nohup and running bittorrent-curses in the background doesn’t seem to work. As soon I enter another command bittorrent-curses stops working.
Any advice?
No problems installing and using. No more guiding the wife through starting a download so I can use it when I get home from work.
Great post, thanks a lot!
I found that under Fedora Core 6, the only way to get nohup to cooperate with this was to run the command:
nohup python /usr/bin/bittorrent-console –display_interval 60 path-to-torrentfile &
the tricks here being:
1) You need to set the display interval pretty high so that it doesnt flood your nohup.out with messages.
2) You need to explicitly execute this with python..
Thanks,
Rob Goretsky
I’m also getting the python-zopeinterface is needed by BitTorrent-5.0.3-1 error
I do have a python-zope-interface package installed though. is this the same package?? I’m using Fedora Core 6
HOW TO open ports from the command line in debian
For the install issues, just:
rpm -ivh –nodeps
Then run it via:
cd /usr/bin
./btdownloadcurses.py /path/to/torrent
Then you’ll get a screen like this:
file: National.Treasure.Book.of.Secrets.TS.DivX-LTT
size: 741,703,680 (707.3 MB)
dest: /usr/bin/National.Treasure.Book.of.Secrets.TS.DivX-LTT
speed: 174.8 KB/s down – 86.6 KB/s
| totals: 650.5 MB down – 130.5 MB up
| error(s):
The command line version is especially useful. This is the only reason why I still have a bittorrent installation on my system. Otherwise KTorrent is the best
try aria.
it can do http,ftp,torrent,multilinker.
i use it all the time…
Hi.
i got this error msg:
>>> unable to setrlimit not allowed to raise maximum limit
Any idea?
For reference for anyone else in pain of my problem;
[root@localhost Download]#
Try this ling instead;
[root@localhost Download]# rpm -ivh –nodeps BitTorrent-5.0.3-1-Python2.4.noarch.rpm
Then use by;
/usr/bin/bittorrent-curses
File “/usr/bin/bittorrent-curses”, line 19, in ?
from BitTorrent.translation import _
File “/usr/lib/python2.4/site-packages/BitTorrent/__init__.py”, line 49, in ?
from BitTorrent.platform import get_temp_subdir, get_dot_dir, is_frozen_exe
File “/usr/lib/python2.4/site-packages/BitTorrent/platform.py”, line 120, in ?
from BTL.defer import ThreadedDeferred
File “/usr/lib/python2.4/site-packages/BTL/defer.py”, line 15, in ?
from twisted.internet import defer
ImportError: No module named twisted.internet
i got this after i finish install the bittorent
please help
thanks
you’ll need to download and install twisted [google for it]. You may also need to download and install
“pycrypto” if that errs, too
GL!
really nice work, helped me alot, many thanks :)
Hi,
I am facing some issues when attempting to use bittorent-curses (or -console, same story):
# python bittorrent-curses.py
Traceback (most recent call last):
File "bittorrent-curses.py", line 19, in
from BitTorrent.translation import _
File "/mnt/sda6/install/BitTorrent-5.2.2/BitTorrent/__init__.py", line 49, in
from BitTorrent.platform import get_temp_subdir, get_dot_dir, is_frozen_exe
File "/mnt/sda6/install/BitTorrent-5.2.2/BitTorrent/platform.py", line 120, in
from BTL.defer import ThreadedDeferred
File "/mnt/sda6/install/BitTorrent-5.2.2/BTL/defer.py", line 54, in
DeferredQueue = defer.DeferredQueue
AttributeError: 'module' object has no attribute 'DeferredQueue'
If I’m going in defer.py and commenting out the offending line (the DeferredQueue variable doesn’t seem to be used anyway), I end up with:
# python bittorrent-curses.py
/mnt/sda5/usr/local/lib/python2.5/site-packages/OpenSSL/__init__.py:11: RuntimeWarning: Python C API version mismatch for module rand: This Python has API version 1013, module rand has version 1012.
import rand, crypto, SSL, tsafe
/mnt/sda5/usr/local/lib/python2.5/site-packages/OpenSSL/__init__.py:11: RuntimeWarning: Python C API version mismatch for module crypto: This Python has API version 1013, module crypto has version 1012.
import rand, crypto, SSL, tsafe
/mnt/sda5/usr/local/lib/python2.5/site-packages/OpenSSL/__init__.py:11: RuntimeWarning: Python C API version mismatch for module SSL: This Python has API version 1013, module SSL has version 1012.
import rand, crypto, SSL, tsafe
Traceback (most recent call last):
File "bittorrent-curses.py", line 34, in
from BitTorrent.MultiTorrent import MultiTorrent, TorrentAlreadyRunning
File "/mnt/sda6/install/BitTorrent-5.2.2/BitTorrent/MultiTorrent.py", line 25, in
from BitTorrent.Torrent import Feedback, Torrent
File "/mnt/sda6/install/BitTorrent-5.2.2/BitTorrent/Torrent.py", line 32, in
from BitTorrent.ConnectionManager import ConnectionManager
File "/mnt/sda6/install/BitTorrent-5.2.2/BitTorrent/ConnectionManager.py", line 21, in
from BitTorrent.RawServer_twisted import Handler
File "/mnt/sda6/install/BitTorrent-5.2.2/BitTorrent/RawServer_twisted.py", line 56, in
from BTL.ConnectionRateLimitReactor import connectionRateLimitReactor
File "/mnt/sda6/install/BitTorrent-5.2.2/BTL/ConnectionRateLimitReactor.py", line 23, in
from twisted.internet import error, address, abstract
ImportError: cannot import name address
Here I cannot comment out lines. as error is used later in the program.
What should I do?
Thanks for advise,
SxN