Bug #1386

boobank broken after upgrade from 0.g to 0.i

Added by Marc Dequènes about 2 years ago. Updated about 2 years ago.

Status:Resolved Start:2014-05-21
Priority:Urgent Due date:
Assigned to:Romain Bignon % Done:

0%

Category:Application / boobank Spent time: -
Target version:0.j
Module: Branch:

Description

After upgrade to 0.i I ran weboob-config update and got:

=== [100%] Module cragr has been installed!

Nevertheless when trying a list command in the console it wants to upgrade again:

2014-05-21 21:14:15,484:DEBUG:bcall:0.i:bcall.py:78:backend_process <Backend 'cragr'>: Calling function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7f6e025ed050>>
2014-05-21 21:14:15,487:DEBUG:bcall:0.i:bcall.py:84:backend_process <Backend 'cragr'>: Called function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7f6e025ed050>> raised an error: TypeError('create_connection() takes at least 1 argument (0 given)',)
Bug(cragr): create_connection() takes at least 1 argument (0 given)
=== [  0%] Getting http://updates.weboob.org/0.i/main/
2014-05-21 21:14:15,620:DEBUG:urllib3.connectionpool:0.i:connectionpool.py:375:_make_request Setting read timeout to 10.0
2014-05-21 21:14:15,673:DEBUG:urllib3.connectionpool:0.i:connectionpool.py:415:_make_request "GET /0.i/main/modules.list HTTP/1.1" 200 32824
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/weboob/core/bcall.py", line 80, in backend_process
    result = function(backend, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/weboob/tools/application/base.py", line 281, in _do_complete
    res = getattr(backend, function)(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/weboob/capabilities/bank.py", line 180, in iter_resources
    return self.iter_accounts()
  File "/home/duck/.local/share/weboob/modules/0.i/cragr/backend.py", line 99, in iter_accounts
    return self.browser.get_accounts_list()
  File "/usr/lib/python2.7/dist-packages/weboob/tools/backend.py", line 298, in browser
    self._browser = self.create_default_browser()
  File "/home/duck/.local/share/weboob/modules/0.i/cragr/backend.py", line 90, in create_default_browser
    self.config['password'].get())
  File "/usr/lib/python2.7/dist-packages/weboob/tools/backend.py", line 346, in create_browser
    return self.BROWSER(*args, **kwargs)
  File "/home/duck/.local/share/weboob/modules/0.i/cragr/web/browser.py", line 57, in __init__
    BaseBrowser.__init__(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/weboob/tools/browser/browser.py", line 516, in __init__
    self.home()
  File "/home/duck/.local/share/weboob/modules/0.i/cragr/web/browser.py", line 60, in home
    self.login()
  File "/home/duck/.local/share/weboob/modules/0.i/cragr/web/browser.py", line 79, in login
    self.location(self.absurl('/'), no_login=True)
  File "/usr/lib/python2.7/dist-packages/weboob/tools/browser/browser.py", line 143, in inner
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/weboob/tools/decorators.py", line 41, in f_retry
    return f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/weboob/tools/browser/browser.py", line 590, in location
    self._change_location(mechanize.Browser.open(self, *args, **kwargs), no_login=no_login)
  File "/usr/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 203, in open
    return self._mech_open(url, data, timeout=timeout)
  File "/usr/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 230, in _mech_open
    response = UserAgentBase.open(self, request, data)
  File "/usr/lib/python2.7/dist-packages/mechanize/_opener.py", line 193, in open
    response = urlopen(self, req, data)
  File "/usr/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 344, in _open
    '_open', req)
  File "/usr/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 332, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 1170, in https_open
    return self.do_open(conn_factory, req)
  File "/usr/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 1115, in do_open
    h.request(req.get_method(), req.get_selector(), req.data, headers)
  File "/usr/lib/python2.7/httplib.py", line 995, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 1029, in _send_request
    self.endheaders(body)
  File "/usr/lib/python2.7/httplib.py", line 991, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 844, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 806, in send
    self.connect()
  File "/usr/lib/python2.7/dist-packages/weboob/tools/browser/browser.py", line 749, in connect
    sock = self._create_connection()
TypeError: create_connection() takes at least 1 argument (0 given)

History

Updated by vincent thenomor about 2 years ago

Hello,

Same issue, but with version 0.h. Issue appeared after python update from 2.7.6 to 2.7.7rc1.

The full stack :

2014-06-06 16:00:59,656:DEBUG:browser:browser.py:277:openurl Opening URL "('http://updates.weboob.org/0.h/main/modules.list',)", {}
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/weboob/core/bcall.py", line 99, in _caller
    result = function(backend, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/weboob/tools/application/base.py", line 269, in _do_complete
    res = getattr(backend, function)(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/weboob/capabilities/bank.py", line 177, in iter_resources
    return self.iter_accounts()
  File "/home/weboob/.local/share/weboob/modules/0.h/bp/backend.py", line 46, in iter_accounts
    return self.browser.get_accounts_list()
  File "/usr/lib/python2.7/dist-packages/weboob/tools/backend.py", line 298, in browser
    self._browser = self.create_default_browser()
  File "/home/weboob/.local/share/weboob/modules/0.h/bp/backend.py", line 43, in create_default_browser
    return self.create_browser(self.config['login'].get(), self.config['password'].get())
  File "/usr/lib/python2.7/dist-packages/weboob/tools/backend.py", line 328, in create_browser
    return self.BROWSER(*args, **kwargs)
  File "/home/weboob/.local/share/weboob/modules/0.h/bp/browser.py", line 66, in __init__
    BaseBrowser.__init__(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/weboob/tools/browser/browser.py", line 548, in __init__
    self.home()
  File "/home/weboob/.local/share/weboob/modules/0.h/bp/browser.py", line 69, in home
    self.location('https://voscomptesenligne.labanquepostale.fr/wsost/OstBrokerWeb/loginform?TAM_OP=login&'
  File "/usr/lib/python2.7/dist-packages/weboob/tools/browser/browser.py", line 167, in inner
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/weboob/tools/decorators.py", line 41, in f_retry
    return f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/weboob/tools/browser/browser.py", line 622, in location
    self._change_location(mechanize.Browser.open(self, *args, **kwargs), no_login=no_login)
  File "/usr/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 203, in open
    return self._mech_open(url, data, timeout=timeout)
  File "/usr/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 230, in _mech_open
    response = UserAgentBase.open(self, request, data)
  File "/usr/lib/python2.7/dist-packages/mechanize/_opener.py", line 193, in open
    response = urlopen(self, req, data)
  File "/usr/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 344, in _open
    '_open', req)
  File "/usr/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 332, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 1170, in https_open
    return self.do_open(conn_factory, req)
  File "/usr/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 1115, in do_open
    h.request(req.get_method(), req.get_selector(), req.data, headers)
  File "/usr/lib/python2.7/httplib.py", line 995, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 1029, in _send_request
    self.endheaders(body)
  File "/usr/lib/python2.7/httplib.py", line 991, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 844, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 806, in send
    self.connect()
  File "/usr/lib/python2.7/dist-packages/weboob/tools/browser/browser.py", line 781, in connect
    sock = self._create_connection()
TypeError: create_connection() takes at least 1 argument (0 given)

Updated by Laurent Bachelier about 2 years ago

  • Status changed from New to Resolved

It's fixed with commit 4b4ec43ab76ebf7875bb989d7403eab11dcdb631.

Updated by Romain Bignon about 2 years ago

  • Target version set to 0.j

Also available in: Atom PDF