** Description changed:
Received this error from software-center:
- File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 403, in
connect
- raise GeneralProxyError((5, _generalerrors[5]))
+ File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 403, in
connect
+ raise GeneralProxyError((5, _generalerrors[5]))
GeneralProxyError: (5, 'bad input')
I looked into this. In socks.py, there is a type comparison of the type of
the destination address to the type of a blank string:
- # Do a minimal input check first
- if (not type(destpair) in (list,tuple)) or (len(destpair) < 2) or
(type(destpair[0]) != type('')) or (type(destpair[1]) != int):
+ # Do a minimal input check first
+ if (not type(destpair) in (list,tuple)) or (len(destpair) < 2) or
(type(destpair[0]) != type('')) or (type(destpair[1]) != int):
- In my case the type of destpair[0] is not type(''), it is unicode -
type(u''). I fixed the bug by modifying the above code in proxy.py as follows:
- # Do a minimal input check first
- if (not type(destpair) in (list,tuple)) or (len(destpair) < 2) or
(type(destpair[0]) != type('') and type(destpair[0]) != type(u'')) or
(type(destpair[1]) != int):
-
+ In my case the type of destpair[0] is not type(''), it is unicode -
type(u''). I fixed the bug by modifying the above code in socks.py as follows:
+ # Do a minimal input check first
+ if (not type(destpair) in (list,tuple)) or (len(destpair) < 2) or
(type(destpair[0]) != type('') and type(destpair[0]) != type(u'')) or
(type(destpair[1]) != int):
Here is the console output from software-center before fixing the bug:
wpwoodjr@ubuntu:~$ software-center
2012-08-28 10:31:52,631 - softwarecenter.ui.gtk3.app - INFO - setting up
proxy 'None'
2012-08-28 10:31:52,641 - softwarecenter.db.database - INFO - open()
database: path=None use_axi=True use_agent=True
2012-08-28 10:31:52,989 - softwarecenter.backend.reviews - WARNING - Could
not get usefulness from server, no username in config file
2012-08-28 10:31:53,225 - softwarecenter.ui.gtk3.app - INFO -
show_available_packages: search_text is '', app is None.
2012-08-28 10:31:53,306 - softwarecenter.db.pkginfo_impl.aptcache - INFO -
aptcache.open()
2012-08-28 10:31:55,980 - softwarecenter.backend.spawn_helper - WARNING -
exit code 1 from helper for
'['/usr/share/software-center/piston_generic_helper.py', '--datadir',
'/usr/share/software-center/', 'SoftwareCenterAgentAPI', 'exhibits', '{"lang":
"en", "series": "precise"}']'
2012-08-28 10:31:55,981 - softwarecenter.backend.spawn_helper - WARNING - got
error from helper: 'ERROR:__main__:urclient_apps
Traceback (most recent call last):
- File "/usr/share/software-center/piston_generic_helper.py", line 214, in
<module>
- piston_reply = f(**kwargs)
- File "/usr/lib/python2.7/dist-packages/piston_mini_client/validators.py",
line 44, in wrapper
- return func(*args, **kwargs)
- File "/usr/lib/python2.7/dist-packages/piston_mini_client/validators.py",
line 44, in wrapper
- return func(*args, **kwargs)
- File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py",
line 137, in wrapper
- body = func(self, *args, **kwargs)
- File
"/usr/share/software-center/softwarecenter/backend/piston/scaclient_pristine.py",
line 59, in exhibits
- return self._get(url)
- File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py",
line 368, in _get
- headers=headers)
- File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py",
line 523, in _request
- method=method, body=body, headers=headers)
- File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1444, in
request
- (response, content) = self._request(conn, authority, uri, request_uri,
method, body, headers, redirections, cachekey)
- File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1196, in
_request
- (response, content) = self._conn_request(conn, request_uri, method, body,
headers)
- File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1132, in
_conn_request
- conn.connect()
- File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 889, in
connect
- sock.connect((self.host, self.port))
- File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 403, in
connect
- raise GeneralProxyError((5, _generalerrors[5]))
+ File "/usr/share/software-center/piston_generic_helper.py", line 214, in
<module>
+ piston_reply = f(**kwargs)
+ File "/usr/lib/python2.7/dist-packages/piston_mini_client/validators.py",
line 44, in wrapper
+ return func(*args, **kwargs)
+ File "/usr/lib/python2.7/dist-packages/piston_mini_client/validators.py",
line 44, in wrapper
+ return func(*args, **kwargs)
+ File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py",
line 137, in wrapper
+ body = func(self, *args, **kwargs)
+ File
"/usr/share/software-center/softwarecenter/backend/piston/scaclient_pristine.py",
line 59, in exhibits
+ return self._get(url)
+ File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py",
line 368, in _get
+ headers=headers)
+ File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py",
line 523, in _request
+ method=method, body=body, headers=headers)
+ File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1444, in
request
+ (response, content) = self._request(conn, authority, uri, request_uri,
method, body, headers, redirections, cachekey)
+ File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1196, in
_request
+ (response, content) = self._conn_request(conn, request_uri, method, body,
headers)
+ File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1132, in
_conn_request
+ conn.connect()
+ File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 889, in
connect
+ sock.connect((self.host, self.port))
+ File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 403, in
connect
+ raise GeneralProxyError((5, _generalerrors[5]))
GeneralProxyError: (5, 'bad input')
'
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to software-center in Ubuntu.
https://bugs.launchpad.net/bugs/1042882
Title:
software-center GeneralProxyError: (5, 'bad input')
Status in “software-center” package in Ubuntu:
New
Bug description:
Received this error from software-center:
File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 403, in
connect
raise GeneralProxyError((5, _generalerrors[5]))
GeneralProxyError: (5, 'bad input')
I looked into this. In socks.py, there is a type comparison of the type of
the destination address to the type of a blank string:
# Do a minimal input check first
if (not type(destpair) in (list,tuple)) or (len(destpair) < 2) or
(type(destpair[0]) != type('')) or (type(destpair[1]) != int):
In my case the type of destpair[0] is not type(''), it is unicode -
type(u''). I fixed the bug by modifying the above code in socks.py as follows:
# Do a minimal input check first
if (not type(destpair) in (list,tuple)) or (len(destpair) < 2) or
(type(destpair[0]) != type('') and type(destpair[0]) != type(u'')) or
(type(destpair[1]) != int):
Here is the console output from software-center before fixing the bug:
wpwoodjr@ubuntu:~$ software-center
2012-08-28 10:31:52,631 - softwarecenter.ui.gtk3.app - INFO - setting up
proxy 'None'
2012-08-28 10:31:52,641 - softwarecenter.db.database - INFO - open()
database: path=None use_axi=True use_agent=True
2012-08-28 10:31:52,989 - softwarecenter.backend.reviews - WARNING - Could
not get usefulness from server, no username in config file
2012-08-28 10:31:53,225 - softwarecenter.ui.gtk3.app - INFO -
show_available_packages: search_text is '', app is None.
2012-08-28 10:31:53,306 - softwarecenter.db.pkginfo_impl.aptcache - INFO -
aptcache.open()
2012-08-28 10:31:55,980 - softwarecenter.backend.spawn_helper - WARNING -
exit code 1 from helper for
'['/usr/share/software-center/piston_generic_helper.py', '--datadir',
'/usr/share/software-center/', 'SoftwareCenterAgentAPI', 'exhibits', '{"lang":
"en", "series": "precise"}']'
2012-08-28 10:31:55,981 - softwarecenter.backend.spawn_helper - WARNING - got
error from helper: 'ERROR:__main__:urclient_apps
Traceback (most recent call last):
File "/usr/share/software-center/piston_generic_helper.py", line 214, in
<module>
piston_reply = f(**kwargs)
File "/usr/lib/python2.7/dist-packages/piston_mini_client/validators.py",
line 44, in wrapper
return func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/piston_mini_client/validators.py",
line 44, in wrapper
return func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py",
line 137, in wrapper
body = func(self, *args, **kwargs)
File
"/usr/share/software-center/softwarecenter/backend/piston/scaclient_pristine.py",
line 59, in exhibits
return self._get(url)
File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py",
line 368, in _get
headers=headers)
File "/usr/lib/python2.7/dist-packages/piston_mini_client/__init__.py",
line 523, in _request
method=method, body=body, headers=headers)
File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1444, in
request
(response, content) = self._request(conn, authority, uri, request_uri,
method, body, headers, redirections, cachekey)
File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1196, in
_request
(response, content) = self._conn_request(conn, request_uri, method, body,
headers)
File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1132, in
_conn_request
conn.connect()
File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 889, in
connect
sock.connect((self.host, self.port))
File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 403, in
connect
raise GeneralProxyError((5, _generalerrors[5]))
GeneralProxyError: (5, 'bad input')
'
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/1042882/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp