ductientn97 / gphotoframe

Automatically exported from code.google.com/p/gphotoframe
Other
0 stars 0 forks source link

Twisted Client Module doesn't have _parse() in Ubuntu 14.04. #116

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. start gphotoframe on command line

What is the expected output? What do you see instead?

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gphotoframe/plugins/flickr/__init__.py", line 82, in prepare
    self._get_url_for(self.argument)
  File "/usr/lib/python2.7/dist-packages/gphotoframe/plugins/flickr/__init__.py", line 98, in _get_url_for
    result = self._get_url_with_twisted(url)
  File "/usr/lib/python2.7/dist-packages/gphotoframe/plugins/base/base.py", line 100, in _get_url_with_twisted
    d = urlget_with_autoproxy(url, cb=cb)
  File "/usr/lib/python2.7/dist-packages/gphotoframe/utils/urlgetautoproxy.py", line 38, in urlget_with_autoproxy
    client = UrlGetWithAutoProxy(url)
  File "/usr/lib/python2.7/dist-packages/gphotoframe/utils/urlgetautoproxy.py", line 28, in __init__
    super(UrlGetWithAutoProxy, self).__init__(proxy_url)
  File "/usr/lib/python2.7/dist-packages/gphotoframe/utils/urlget.py", line 40, in __init__
    self.proxy_host, self.proxy_port = client._parse(proxy)[1:3]
AttributeError: 'module' object has no attribute '_parse'

What version of the product are you using? On what operating system?
latest

Please provide any additional information below.
It seems that twisted.web.client does not contain the _parse function anymore.

Original issue reported on code.google.com by lars.h...@googlemail.com on 31 Jul 2014 at 10:11

GoogleCodeExporter commented 8 years ago
I fixed this one by:

lars@dachs:/usr/lib/python2.7/dist-packages/gphotoframe/utils$ diff urlget.py 
urlget.py.orig 
34,35d33
< import urlparse
< 
42,44c40
<         _up=urlparse.urlsplit(proxy)
<         self.proxy_host=_up.hostname
<         self.proxy_port=_up.port
---
>         self.proxy_host, self.proxy_port = client._parse(proxy)[1:3]
58,62c54
<         _up=urlparse.urlsplit(url)
<         scheme=_up.scheme
<         host=_up.hostname
<         port=_up.port
<         path=_up.path
---
>         scheme, host, port, path = client._parse(url)

Original comment by lars.h...@googlemail.com on 31 Jul 2014 at 10:37

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for your report and patch.
Fixed in revision 921fd13c4ce0.

Original comment by yendo0206 on 12 Aug 2014 at 2:14