touchandgo-devs / touchandgo

Torrent streaming CLI and python library
GNU General Public License v3.0
140 stars 24 forks source link

AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3' #80

Closed juantelez closed 8 years ago

juantelez commented 8 years ago

Hi. I'm using:

And get this error:

$ pip install touchandgo Collecting touchandgo Requirement already satisfied (use --upgrade to upgrade): netifaces==0.10.4 in /usr/local/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): qtfaststart==1.8 in /usr/local/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): ojota==2.0.1 in /usr/local/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): requests==2.3.0 in /usr/local/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): TorrentMediaSearcher==1.0.3 in /usr/local/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): pbr in /usr/local/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): KickassAPI in /usr/local/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): python-daemon==1.6.1 in /usr/local/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): colorama==0.3.2 in /usr/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): altasetting in /usr/local/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): flask==0.10.1 in /usr/local/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): pyQuery in /usr/local/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): simplejson==3.6.2 in /usr/local/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): pyaml in /usr/local/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): subliminal==0.7.4 in /usr/local/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): PyChromecast==0.6.13 in /usr/local/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): blessings in /usr/local/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): guessit==0.6.2 in /usr/local/lib/python2.7/dist-packages (from touchandgo) Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/dist-packages (from KickassAPI->touchandgo) Requirement already satisfied (use --upgrade to upgrade): lockfile>=0.9 in /usr/local/lib/python2.7/dist-packages (from python-daemon==1.6.1->touchandgo) Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.7 in /usr/local/lib/python2.7/dist-packages (from flask==0.10.1->touchandgo) Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in /usr/local/lib/python2.7/dist-packages (from flask==0.10.1->touchandgo) Requirement already satisfied (use --upgrade to upgrade): itsdangerous>=0.21 in /usr/local/lib/python2.7/dist-packages (from flask==0.10.1->touchandgo) Requirement already satisfied (use --upgrade to upgrade): cssselect>0.7.9 in /usr/local/lib/python2.7/dist-packages (from pyQuery->touchandgo) Requirement already satisfied (use --upgrade to upgrade): lxml>=2.1 in /usr/lib/python2.7/dist-packages (from pyQuery->touchandgo) Requirement already satisfied (use --upgrade to upgrade): PyYAML in /usr/local/lib/python2.7/dist-packages (from pyaml->touchandgo) Requirement already satisfied (use --upgrade to upgrade): beautifulsoup4>=4.3.2 in /usr/local/lib/python2.7/dist-packages (from subliminal==0.7.4->touchandgo) Requirement already satisfied (use --upgrade to upgrade): enzyme>=0.4.0 in /usr/local/lib/python2.7/dist-packages (from subliminal==0.7.4->touchandgo) Collecting html5lib>=0.99 (from subliminal==0.7.4->touchandgo) Requirement already satisfied (use --upgrade to upgrade): dogpile.cache>=0.5.2 in /usr/local/lib/python2.7/dist-packages (from subliminal==0.7.4->touchandgo) Requirement already satisfied (use --upgrade to upgrade): babelfish<0.5,>=0.4.0 in /usr/local/lib/python2.7/dist-packages (from subliminal==0.7.4->touchandgo) Requirement already satisfied (use --upgrade to upgrade): charade>=1.0.3 in /usr/local/lib/python2.7/dist-packages (from subliminal==0.7.4->touchandgo) Requirement already satisfied (use --upgrade to upgrade): pysrt>=0.5.0 in /usr/local/lib/python2.7/dist-packages (from subliminal==0.7.4->touchandgo) Requirement already satisfied (use --upgrade to upgrade): zeroconf>=0.16.0 in /usr/local/lib/python2.7/dist-packages (from PyChromecast==0.6.13->touchandgo) Requirement already satisfied (use --upgrade to upgrade): protobuf>=3.0.0b1.post2 in /usr/local/lib/python2.7/dist-packages (from PyChromecast==0.6.13->touchandgo) Requirement already satisfied (use --upgrade to upgrade): MarkupSafe in /usr/local/lib/python2.7/dist-packages (from Jinja2>=2.4->flask==0.10.1->touchandgo) Requirement already satisfied (use --upgrade to upgrade): six in /usr/local/lib/python2.7/dist-packages (from html5lib>=0.99->subliminal==0.7.4->touchandgo) Requirement already satisfied (use --upgrade to upgrade): dogpile.core>=0.4.1 in /usr/local/lib/python2.7/dist-packages (from dogpile.cache>=0.5.2->subliminal==0.7.4->touchandgo) Requirement already satisfied (use --upgrade to upgrade): chardet in /usr/lib/python2.7/dist-packages (from pysrt>=0.5.0->subliminal==0.7.4->touchandgo) Requirement already satisfied (use --upgrade to upgrade): enum-compat in /usr/local/lib/python2.7/dist-packages (from zeroconf>=0.16.0->PyChromecast==0.6.13->touchandgo) Requirement already satisfied (use --upgrade to upgrade): enum34 in /usr/local/lib/python2.7/dist-packages (from enum-compat->zeroconf>=0.16.0->PyChromecast==0.6.13->touchandgo) Installing collected packages: touchandgo, html5lib Successfully installed html5lib-0.9999999 touchandgo-0.12.5

$ touchandgo Crisis 1 5 Traceback (most recent call last): File "/usr/local/bin/touchandgo", line 7, in from touchandgo.main import main File "/usr/local/lib/python2.7/dist-packages/touchandgo/main.py", line 10, in from touchandgo.helpers import daemonize File "/usr/local/lib/python2.7/dist-packages/touchandgo/helpers.py", line 14, in from ojota import set_data_source File "/usr/local/lib/python2.7/dist-packages/ojota/init.py", line 18, in from base import Ojota, Relation, current_data_code, set_data_source, \ File "/usr/local/lib/python2.7/dist-packages/ojota/base.py", line 21, in import ojota.sources File "/usr/local/lib/python2.7/dist-packages/ojota/sources.py", line 27, in import requests File "/usr/local/lib/python2.7/dist-packages/requests/init.py", line 53, in from .packages.urllib3.contrib import pyopenssl File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 70, in ssl.PROTOCOL_SSLv3: OpenSSL.SSL.SSLv3_METHOD, AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'

What other information can I provide to you?

nicomanso commented 8 years ago

try pip install --upgrade requests

In my case, I use virtualenv to "isolate" the program environment from the OS.

virtualenv venv source ven/bin/activate pip install touchandgo pip install --upgrade requests

More info

juantelez commented 8 years ago

I get the following error: (Maybe is because one time I run pip install as roor?)

$ pip install --upgrade requests Collecting requests Downloading requests-2.10.0-py2.py3-none-any.whl (506kB) 100% |████████████████████████████████| 512kB 443kB/s Installing collected packages: requests Found existing installation: requests 2.3.0 Uninstalling requests-2.3.0: Exception: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg/pip/commands/install.py", line 317, in run prefix=options.prefix_path, File "/usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg/pip/req/req_set.py", line 736, in install requirement.uninstall(auto_confirm=True) File "/usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg/pip/req/req_install.py", line 742, in uninstall paths_to_remove.remove(auto_confirm) File "/usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove renames(path, new_path) File "/usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg/pip/utils/init.py", line 267, in renames shutil.move(old, new) File "/usr/lib/python2.7/shutil.py", line 303, in move os.unlink(src) OSError: [Errno 13] Permiso denegado: '/usr/local/lib/python2.7/dist-packages/requests-2.3.0.dist-info/DESCRIPTION.rst'

nicomanso commented 8 years ago

Yes, in my case I use the virtualenv so there is no problem and no need to run commands as root, but in your case, you need to run the command as root.

You will be updating the requests package for "all" the operating system, so if there is another python program that need the older version of resquests it will break.

juantelez commented 8 years ago

I've also tried with virtualenv and can't find the libtorrent module

nicomanso commented 8 years ago

I've also tried with virtualenv and can't find the libtorrent module

virtualenv --system-site-packages venv

felipelerena commented 8 years ago

You have to make a symlink from the virtualenv On 4 Jun 2016 9:35 p.m., "juantelez" notifications@github.com wrote:

I've also tried with virtualenv and can't find the libtorrent module

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/touchandgo-devs/touchandgo/issues/80#issuecomment-223786188, or mute the thread https://github.com/notifications/unsubscribe/AAVI28cR4R0gi6yl_aC_v61R8rAbTsT4ks5qIhnKgaJpZM4IsoTw .

juantelez commented 8 years ago

Thanks, felipelerena, nicoman. It (almost) worked!

Touchandgo

Kickass Torrents Results 1) Crisis S01E05 HDTV x264-LOL [eztv] 277.63 MB S:4 L:2 2) Crisis S01E05 HDTV x264-LOL[ettv] 277.63 MB S:2 L:0 3) Crisis.S01E05.720p.HDTV.X264-DIMENSION [PublicHD] 970.34 MB S:1 L:0 4) Max Steel 2013 S01E05 Secret Identity Crisis WEB-DL x264 AAC 155.12 MB S:0 L:1 5) Crisis.S01E05.1080p.WEB-DL.DD5.1.H.264-KiNGS [PublicHD] 1.53 GB S:0 L:1 6) Max Steel 2013 S01E05 Secret Identity Crisis WEB-DL XviD MP3 171.59 MB S:0 L:0 7) Max Steel 2013 S01E05 Secret Identity Crisis 720p WEB-DL x264 349.72 MB S:0 L:0 8) Crisis.S01E05.HDTV.x264-LOL[rartv] 277.63 MB S:0 L:0 9) Crisis.S01E05.720p.HDTV.X264-DIMENSION[rartv] 991.03 MB S:0 L:0 10) Crisis S01E05 HDTV x264-LOL 285.39 MB S:0 L:0 11) Crisis S01E05 HDTV XviD-FUM[ettv] 347.58 MB S:0 L:0 12) Crisis S01E05 HDTV XviD-EVO 346.03 MB S:0 L:0 13) Crisis S01E05 HDTV XviD-AFG 347.48 MB S:0 L:0 14) Crisis S01E05 HDTV XviD-EVO 346.03 MB S:0 L:0 15) Crisis S01E05 HDTV XviD-AFG 347.48 MB S:0 L:0 16) Crisis S01E05 720p HDTV X264-DIMENSION 970.34 MB S:0 L:0 17) Crisis S01E05 480p HDTV x264-mSD 178.01 MB S:0 L:0 18) Crisis S01E05 VOSTFR HDTV x264-BRN [Seedbox] mp4 265.65 MB S:0 L:0 19) Crisis.S01E05.720p.WEB-DL.DD5.1.H.264-KiNGS [PublicHD] 1.33 GB S:0 L:0 20) Crisis - S01E05 - SweSub.avi 390.05 MB S:0 L:0 21) Will Smith s Midlife Crisis Management S01E05.mp3 25.71 MB S:0 L:0 22) Crisis.S01E05 - Designated Allies 480p HDTV 151.02 MB S:0 L:0 Select which torrent you want to download (1-22): 1 Traceback (most recent call last): File "/home/juan/venv/bin/touchandgo", line 11, in sys.exit(main()) File "/home/juan/venv/local/lib/python2.7/site-packages/touchandgo/main.py", line 71, in main touchandgo.watch() File "/home/juan/venv/local/lib/python2.7/site-packages/touchandgo/search/init.py", line 68, in watch self.search_magnet() File "/home/juan/venv/local/lib/python2.7/site-packages/touchandgo/search/init.py", line 81, in search_magnet self.kat_search() File "/home/juan/venv/local/lib/python2.7/site-packages/touchandgo/search/init.py", line 120, in kat_search results = {'magnet': results[opt].magnet_link + extra_tracker} TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' (venv) juan@compu:~$

It doesn't matter the new problem, I don't even know what kind of tv show Crisis is.