Python 3 SOCKSIPY Module prints error - sockets

I downloaded the socks.py file and placed it in the python lib folder. When I run this script:
import socks
import socket
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "localhost", 9150)
socket.socket = socks.socksocket
import requests
from bs4 import BeautifulSoup
url = 'http://www.google.ca'
r = requests.get(url)
soup = BeautifulSoup(r.content)
print (soup)
it sends an error like this:
Traceback (most recent call last):
File "/Users/Raphael/Desktop/whatsmyip.py", line 8, in <module>
r = requests.get(url)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/requests/api.py", line 68, in get
return request('get', url, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/requests/api.py", line 50, in request
response = session.request(method=method, url=url, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/requests/sessions.py", line 465, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/requests/adapters.py", line 370, in send
timeout=timeout
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 544, in urlopen
body=body, headers=headers)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 349, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/http/client.py", line 1088, in request
self._send_request(method, url, body, headers)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/http/client.py", line 1126, in _send_request
self.endheaders(body)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/http/client.py", line 1084, in endheaders
self._send_output(message_body)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/http/client.py", line 922, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/http/client.py", line 857, in send
self.connect()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/requests/packages/urllib3/connection.py", line 155, in connect
conn = self._new_conn()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/requests/packages/urllib3/connection.py", line 134, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/requests/packages/urllib3/util/connection.py", line 78, in create_connection
sock.connect(sa)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/socks.py", line 369, in connect
self.__negotiatesocks5(destpair[0],destpair[1])
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/socks.py", line 176, in __negotiatesocks5
self.sendall("\x05\x01\x00")
TypeError: 'str' does not support the buffer interface
Can someone help me? I do not know how to fix this.. No where explains what I need to do in this case. Thank you very much

Related

yum update return ssl error on centos 5.8

I want to install a package by doing yum install on my centos 5.8 64, but it returns SSLError: unknow protocol.
I know centos 5.8 is ancient but at the state upgrading is not my option, yet.
This is the error:
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 309, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 178, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 345, in doCommands
self._getTs(needTsRemove)
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 101, in _getTs
self._getTsInfo(remove_only)
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 112, in _getTsInfo
pkgSack = self.pkgSack
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 662, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 502, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.4/site-packages/yum/repos.py", line 260, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 168, in populate
if self._check_db_version(repo, mydbtype):
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 226, in _check_db_version
return repo._check_db_version(mdtype)
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1226, in _check_db_version
repoXML = self.repoXML
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1399, in <lambda>
repoXML = property(fget=lambda self: self._getRepoXML(),
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1391, in _getRepoXML
self._loadRepoXML(text=self)
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1381, in _loadRepoXML
return self._groupLoadRepoXML(text, ["primary"])
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1365, in _groupLoadRepoXML
if self._commonLoadRepoXML(text):
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1201, in _commonLoadRepoXML
result = self._getFileRepoXML(local, text)
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 974, in _getFileRepoXML
cache=self.http_caching == 'all')
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 811, in _getFile
http_headers=headers,
File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 412, in urlgrab
return self._mirror_try(func, url, kw)
File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 398, in _mirror_try
return func_ref( *(fullurl,), **kwargs )
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 936, in urlgrab
return self._retry(opts, retryfunc, url, filename)
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 854, in _retry
r = apply(func, (opts,) + args, {})
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 922, in retryfunc
fo = URLGrabberFileObject(url, filename, opts)
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1010, in __init__
self._do_open()
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1093, in _do_open
fo, hdr = self._make_request(req, opener)
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1202, in _make_request
fo = opener.open(req)
File "/usr/lib64/python2.4/urllib2.py", line 364, in open
response = meth(req, response)
File "/usr/lib64/python2.4/urllib2.py", line 471, in http_response
response = self.parent.error(
File "/usr/lib64/python2.4/urllib2.py", line 396, in error
result = self._call_chain(*args)
File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
result = func(*args)
File "/usr/lib64/python2.4/urllib2.py", line 565, in http_error_302
return self.parent.open(new)
File "/usr/lib64/python2.4/urllib2.py", line 358, in open
response = self._open(req, data)
File "/usr/lib64/python2.4/urllib2.py", line 376, in _open
'_open', req)
File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
result = func(*args)
File "/usr/lib64/python2.4/site-packages/M2Crypto/m2urllib2.py", line 82, in https_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/usr/lib64/python2.4/httplib.py", line 810, in request
self._send_request(method, url, body, headers)
File "/usr/lib64/python2.4/httplib.py", line 833, in _send_request
self.endheaders()
File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders
self._send_output()
File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output
self.send(msg)
File "/usr/lib64/python2.4/httplib.py", line 652, in send
self.connect()
File "/usr/lib64/python2.4/site-packages/M2Crypto/httpslib.py", line 47, in connect
self.sock.connect((self.host, self.port))
File "/usr/lib64/python2.4/site-packages/M2Crypto/SSL/Connection.py", line 174, in connect
ret = self.connect_ssl()
File "/usr/lib64/python2.4/site-packages/M2Crypto/SSL/Connection.py", line 167, in connect_ssl
return m2.ssl_connect(self.ssl, self._timeout)
M2Crypto.SSL.SSLError: unknown protocol
Doing yum update resulting the same error as above.
I have done upgrading openssl to OpenSSL 1.0.2a 19 Mar 2015 but the error still the same.
What would be the fix, so I am able to use yum to install package?
Thank You.
Older OS doesn't work with default /etc/yum.repos.d/CentOS-Base.repo file.
Some links suggest to use http://vault.centos.org/, however it redirects to https link internally which makes yum commands to fail with SSL error "M2Crypto.SSL.SSLError: unknown protocol".
After some research, it worked for me with below base URL (Here I am trying with 5.11 Cent OS version).
http://archive.kernel.org/centos-vault/5.11/
Maybe you can get the package you are looking for here:
https://vault.centos.org/5.8/
There are a few .iso images there that probably have the package you need. I see openssl rpm here but it's not the same version that you posted for:
https://vault.centos.org/5.8/os/SRPMS/

Airflow Running task from UI, KeyError: No such transport

airflow cfg settings related to celery are:
broker_url = 'amqp://guest:guest#rabbitmq_server:8080'
celery_result_backend = db+postgresql://developer:password#postgres_server:5432/db_name
The airflow webserver runs ok, but while running a task from airflow UI I get the error.
I am error while running airflow scheduler,tracecak is:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 69, in inner
return self._run_view(f, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 368, in _run_view
return fn(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flask_login.py", line 755, in decorated_view
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/airflow/www/utils.py", line 125, in wrapper
return f(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/airflow/www/utils.py", line 172, in wrapper
return f(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/airflow/www/views.py", line 952, in run
executor.heartbeat()
File "/usr/local/lib/python2.7/dist-packages/airflow/executors/base_executor.py", line 124, in heartbeat
self.execute_async(key, command=command, queue=queue)
File "/usr/local/lib/python2.7/dist-packages/airflow/executors/celery_executor.py", line 80, in execute_async
args=[command], queue=queue)
File "/usr/local/lib/python2.7/dist-packages/celery/app/task.py", line 536, in apply_async
**options
File "/usr/local/lib/python2.7/dist-packages/celery/app/base.py", line 734, in send_task
with self.producer_or_acquire(producer) as P:
File "/usr/local/lib/python2.7/dist-packages/celery/app/base.py", line 863, in producer_or_acquire
producer, self.producer_pool.acquire, block=True,
File "/usr/local/lib/python2.7/dist-packages/celery/app/base.py", line 1233, in producer_pool
return self.amqp.producer_pool
File "/usr/local/lib/python2.7/dist-packages/celery/app/amqp.py", line 614, in producer_pool
self.app.connection_for_write()]
File "/usr/local/lib/python2.7/dist-packages/celery/app/base.py", line 760, in connection_for_write
return self._connection(url or self.conf.broker_write_url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/celery/app/base.py", line 828, in _connection
'broker_connection_timeout', connect_timeout
File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 179, in __init__
if not get_transport_cls(transport).can_parse_url:
File "/usr/local/lib/python2.7/dist-packages/kombu/transport/__init__.py", line 83, in get_transport_cls
_transport_cache[transport] = resolve_transport(transport)
File "/usr/local/lib/python2.7/dist-packages/kombu/transport/__init__.py", line 64, in resolve_transport
raise KeyError('No such transport: {0}'.format(transport))
KeyError: u'No such transport: '
My module versions are:
airflow==1.8
celery==4.1.0
kombu==4.1.0
python==2.7.12
I wasted lot of time on this issue, the reason for this error was quotation marks in broker_url = 'amqp://guest:guest#rabbitmq_server:8080' just removing the quotes: broker_url = amqp://guest:guest#rabbitmq_server:8080 solved the problem.

Flask Mail ConnectionResetError: [Errno 54] Connection reset by peer

I am following this basic tutorial from the link exactly:
https://www.tutorialspoint.com/flask/flask_mail.htm
Anyone know what cause this problem? I think it should be a common problem?
Is there any additional setting for flask mail?
Here is the full error msg:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/app.py", line 1997, in __call__
return self.wsgi_app(environ, start_response)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/app.py", line 1985, in wsgi_app
response = self.handle_exception(e)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/app.py", line 1540, in handle_exception
reraise(exc_type, exc_value, tb)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Users/boxia/PycharmProjects/learn_flask/test.py", line 18, in index
mail.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask_mail.py", line 491, in send
with self.connect() as connection:
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask_mail.py", line 144, in __enter__
self.host = self.configure_host()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask_mail.py", line 156, in configure_host
host = smtplib.SMTP_SSL(self.mail.server, self.mail.port)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/smtplib.py", line 1029, in __init__
source_address)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/smtplib.py", line 251, in __init__
(code, msg) = self.connect(host, port)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/smtplib.py", line 335, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/smtplib.py", line 1037, in _get_socket
server_hostname=self._host)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 401, in wrap_socket
_context=self, _session=session)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 808, in __init__
self.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1061, in do_handshake
self._sslobj.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 683, in do_handshake
self._sslobj.do_handshake()

Querying broken with pymongo 3.0 and Flask-MongoEngine

I recently upgraded to pymongo 3.0 and was getting the same error mentioned here. The accepted answer fixed the read preferences error and my application is running. However whenever I try to run a query I am now getting a new error and was wondering if anyone else had run into this.
Here is the Traceback.
Traceback (most recent call last):
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/flask/app.py", line 1836, in __call__
return self.wsgi_app(environ, start_response)
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/flask_login.py", line 756, in decorated_view
elif not current_user.is_authenticated():
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/werkzeug/local.py", line 338, in __getattr__
return getattr(self._get_current_object(), name)
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/werkzeug/local.py", line 297, in _get_current_object
return self.__local()
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/flask_login.py", line 46, in <lambda>
current_user = LocalProxy(lambda: _get_user())
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/flask_login.py", line 794, in _get_user
current_app.login_manager._load_user()
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/flask_login.py", line 363, in _load_user
return self.reload_user()
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/flask_login.py", line 325, in reload_user
user = self.user_callback(user_id)
File "/mongo_login/mongo_login/app/auth/views.py", line 79, in load_user
user.get_by_id(id)
File "/mongo_login/mongo_login/app/auth/users.py", line 23, in get_by_id
dbUser = models.User.objects.with_id(id)
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/mongoengine/queryset/base.py", line 600, in with_id
return queryset.filter(pk=object_id).first()
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/mongoengine/queryset/base.py", line 309, in first
result = queryset[0]
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/mongoengine/queryset/base.py", line 160, in __getitem__
return queryset._document._from_son(queryset._cursor[key],
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/mongoengine/queryset/base.py", line 1410, in _cursor
**self._cursor_args)
File "/mongo_login/mongo_login_env/lib/python2.6/site-packages/pymongo/collection.py", line 929, in find
return Cursor(self, *args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'snapshot'
There is an open bug on MongoEngine's GitHub.
The workaround appears to be using Pymongo 2.7.2.

Connection behind proxy

I have Enthought Canopy (version 1.2.0.1610) intalled on my system. I'm trying to login to the Enthought server. My system is Ubuntu 13.10 x64, and I'm behind a corporate proxy that uses NTLM authentication protocol. To access the Internet I'm using cntlm proxy server on my system. In the Enthought proxy settings I set up the proxy. And It passes test. But, when I try to login it does not login without any errors.
I run Canopy from command line to see if there is any error output, and I got following errors.
Traceback (most recent call last):
File "build/bdist.linux-x86_64/egg/canopy/package_manager/package_manager_service.py", line 667, in _locked
File "build/bdist.linux-x86_64/egg/canopy/package_manager/package_manager_service.py", line 383, in update_addon_index
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/enpkg.py", line 182, in reconnect
self._connect()
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/enpkg.py", line 187, in _connect
self.remote.connect(self.userpass)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/joined.py", line 11, in connect
repo.connect(auth)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/indexed.py", line 18, in connect
self._index = self.get_index()
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/indexed.py", line 100, in get_index
fp = self.get_data('index.json?pypi=true')
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/indexed.py", line 124, in get_data
return self.opener.open(request)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 400, in open
response = self._open(req, data)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 418, in _open
'_open', req)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 1215, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 1174, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 958, in request
self._send_request(method, url, body, headers)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 992, in _send_request
self.endheaders(body)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 954, in endheaders
self._send_output(message_body)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 814, in _send_output
self.send(msg)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 776, in send
self.connect()
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 1160, in connect
self._tunnel()
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 741, in _tunnel
(version, code, message) = response._read_status()
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 371, in _read_status
raise BadStatusLine(line)
BadStatusLine: ''
''
Traceback (most recent call last):
File "build/bdist.linux-x86_64/egg/canopy/package_manager/package_manager_service.py", line 667, in _locked
File "build/bdist.linux-x86_64/egg/canopy/package_manager/package_manager_service.py", line 383, in update_addon_index
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/enpkg.py", line 182, in reconnect
self._connect()
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/enpkg.py", line 187, in _connect
self.remote.connect(self.userpass)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/joined.py", line 11, in connect
repo.connect(auth)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/indexed.py", line 18, in connect
self._index = self.get_index()
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/indexed.py", line 100, in get_index
fp = self.get_data('index.json?pypi=true')
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/site-packages/enstaller/store/indexed.py", line 124, in get_data
return self.opener.open(request)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 400, in open
response = self._open(req, data)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 418, in _open
'_open', req)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 1215, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/urllib2.py", line 1174, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 958, in request
self._send_request(method, url, body, headers)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 992, in _send_request
self.endheaders(body)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 954, in endheaders
self._send_output(message_body)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 814, in _send_output
self.send(msg)
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 776, in send
self.connect()
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 1160, in connect
self._tunnel()
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 741, in _tunnel
(version, code, message) = response._read_status()
File "/opt/Canopy/appdata/canopy-1.2.0.1610.rh5-x86_64/lib/python2.7/httplib.py", line 371, in _read_status
raise BadStatusLine(line)
BadStatusLine: ''
I'll highly appreciate any help. Thank you...
Updated https://support.enthought.com/entries/23590213-Can-I-use-Canopy-Behind-a-Proxy-Firewall- to reflect the fact that NTLM proxy authentication is not yet supported. Apologies for the inconvenience.