JohnDoee / autotorrent

Matches torrents with files and gets them seeded
MIT License
269 stars 34 forks source link

Issues from dev. #8

Closed b0xy closed 7 years ago

b0xy commented 8 years ago

Having issues with this on raspberry pi2. All dependencies appear to be satisfied.

pi@raspberrypi ~ $ virtualenv autotorrent-env New python executable in autotorrent-env/bin/python Installing distribute.............................................................................................................................................................................................done. Installing pip...............done. pi@raspberrypi ~ $ autotorrent-env/bin/pip install git+https://github.com/JohnDoee/autotorrent.git#develop Downloading/unpacking git+https://github.com/JohnDoee/autotorrent.git Cloning https://github.com/JohnDoee/autotorrent.git to /tmp/pip-g_C5bx-build Running setup.py egg_info for package from git+https://github.com/JohnDoee/autotorrent.git

Downloading/unpacking six (from autotorrent==1.6.0) Downloading six-1.10.0.tar.gz Running setup.py egg_info for package six

no previously-included directories found matching 'documentation/_build'

Downloading/unpacking deluge-client (from autotorrent==1.6.0) Downloading deluge-client-1.0.3.tar.gz Running setup.py egg_info for package deluge-client

Downloading/unpacking requests (from autotorrent==1.6.0) Downloading requests-2.9.1.tar.gz (484Kb): 484Kb downloaded Running setup.py egg_info for package requests

Installing collected packages: six, deluge-client, requests, autotorrent Running setup.py install for six

no previously-included directories found matching 'documentation/_build'

Running setup.py install for deluge-client

Running setup.py install for requests

Running setup.py install for autotorrent

Installing autotorrent script to /home/pi/autotorrent-env/bin

Successfully installed six deluge-client requests autotorrent Cleaning up... pi@raspberrypi ~ $ pip freeze acdcli==0.3.1 appdirs==1.4.0 autotorrent==1.6.0 chardet==2.0.1 colorama==0.3.5 deluge-client==1.0.3 mcpi==0.1.1 numpy==1.6.2 picamera==1.10 pifacecommon==4.1.2 pifacedigitalio==3.0.4 pygame==1.9.2a0 pyOpenSSL==0.13.1 pyserial==2.5 python-dateutil==2.4.2 requests==2.9.1 requests-toolbelt==0.5.1 RPi.GPIO==0.5.11 six==1.10.0 SQLAlchemy==1.0.11

pi@raspberrypi ~ $ cd autotorrent-env/bin/

pi@raspberrypi ~/autotorrent-env/bin $ source activate (autotorrent-env)pi@raspberrypi ~/autotorrent-env/bin $ pip3 freeze acdcli==0.3.1 appdirs==1.4.0 autotorrent==1.6.0 chardet==2.0.1 colorama==0.3.5 deluge-client==1.0.3 mcpi==0.1.1 numpy==1.6.2 picamera==1.10 pifacecommon==4.1.2 pifacedigitalio==3.0.4 pygame==1.9.2a0 pyOpenSSL==0.13.1 pyserial==2.5 python-dateutil==2.4.2 requests==2.9.1 requests-toolbelt==0.5.1 RPi.GPIO==0.5.11 six==1.10.0 SQLAlchemy==1.0.11

(autotorrent-env)pi@raspberrypi ~/autotorrent-env/bin $ cp ~/_autotorrent.db ~/autotorrent.conf .

(autotorrent-env)pi@raspberrypi ~/autotorrent-env/bin $ ./autotorrent -t Connected to torrent client successfully! result: cwd:'/home/pi', pid:18437

(autotorrent-env)pi@raspberrypi ~/autotorrent-env/bin $ ./autotorrent -a ~/ahd/Blood\ Ties\ -\ 2013\ (Blu-ray\ -\ MKV\ -\ h.264\ Remux).torrent Found 1 torrent(s) Traceback (most recent call last): File "./autotorrent", line 9, in load_entry_point('autotorrent==1.6.0', 'console_scripts', 'autotorrent')() File "/home/pi/autotorrent-env/local/lib/python2.7/site-packages/autotorrent/cmd.py", line 214, in commandline_handler result = at.handle_torrentfile(os.path.join(current_path, torrent), dry_run) File "/home/pi/autotorrent-env/local/lib/python2.7/site-packages/autotorrent/at.py", line 421, in handle_torrentfile if self.check_torrent_in_client(torrent): File "/home/pi/autotorrent-env/local/lib/python2.7/site-packages/autotorrent/at.py", line 476, in check_torrent_in_client info_hash = self.get_info_hash(torrent) File "/home/pi/autotorrent-env/local/lib/python2.7/site-packages/autotorrent/at.py", line 90, in get_info_hash return hashlib.sha1(bencode(torrent[b'info'])).hexdigest() File "/home/pi/autotorrent-env/local/lib/python2.7/site-packages/autotorrent/bencode.py", line 122, in bencode encode_func[type(x)](x, r) File "/home/pi/autotorrent-env/local/lib/python2.7/site-packages/autotorrent/bencode.py", line 102, in encode_dict encode_func[type(v)](v, r) File "/home/pi/autotorrent-env/local/lib/python2.7/site-packages/autotorrent/bencode.py", line 95, in encode_list encode_func[type(i)](i, r) File "/home/pi/autotorrent-env/local/lib/python2.7/site-packages/autotorrent/bencode.py", line 102, in encode_dict encode_func[type(v)](v, r) KeyError: <type 'long'> (autotorrent-env)pi@raspberrypi ~/autotorrent-env/bin $

maxim-sm commented 7 years ago

I'm having the same issue with different torrent files. Some of them works while others give this exception. I tried it with versions 1.6.1 1.6.0 1.5.2

I'm also trying to run it on the rpi 2. Will be glad to give any needed information.

JohnDoee commented 7 years ago

I actually tried to reproduce this back when it was originally posted. Can you tell me what distro etc. you got installed on your rpi ?

maxim-sm commented 7 years ago

Thank you for the reply.

I'm running OSMC version 9.2016 OSMC is based on Debian 8.6 (jessie). Python version 2.7.9

I can email you an example of a torrent file which gives the exception.

JohnDoee commented 7 years ago

No need, I found the bug. I must've tested with python3 back when @b0xy filed the issue. Thanks for re-raising the issue, it was something really simple.

Should be fixed in 1.6.2 :smile:

maxim-sm commented 7 years ago

Thank you very much!