Bug #1654

Paypal: IndexError: list index out of range

Added by leto 2 over 2 years ago. Updated about 2 years ago.

Status:Resolved Start:2014-11-04
Priority:Normal Due date:
Assigned to:Romain Bignon % Done:

100%

Category:Application / boobank Spent time: -
Target version:1.1
Module:paypal Branch:

Description

boobank -b paypal -d
2014-11-04 18:36:58,201:DEBUG:modules:1.1:modules.py:161:load_module Loaded module "paypal" from /home/toto/weboob/modules/paypal
2014-11-04 18:36:58,201:DEBUG:backend:1.1:modules.py:98:create_instance Created backend "paypal" for module "paypal" 
Welcome to boobank v1.1

Copyright(C) 2010-2014 Romain Bignon, Christophe Benz
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Type "help" to display available commands.

Loaded backends: paypal

boobank> ls
                 Account                     Balance    Coming 
------------------------------------------+----------+----------
2014-11-04 18:37:04,029:DEBUG:bcall:1.1:bcall.py:81:backend_process <Backend 'paypal'>: Calling function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7fe92e46bc50>>
2014-11-04 18:37:04,242:DEBUG:backend.paypal.browser:1.1:browser.py:405:lowsslcheck Found b8f6c76050ed3035aab08474b1da0ff783f20d114b1740e8db275fe433ff69af as certificate hash
2014-11-04 18:37:05,442:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=**********] Went on https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-run
2014-11-04 18:37:05,471:DEBUG:backend.paypal.browser:1.1:browser.py:680:_change_location !! Relogin !!
2014-11-04 18:37:07,843:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=**********] Went on https://www.paypal.com/fr/cgi-bin/webscr?cmd=_login-processing&login_cmd=_login-done&login_access=**********
2014-11-04 18:37:09,246:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=**********] Went on https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-run
2014-11-04 18:37:11,788:WARNING:backend.paypal.browser:1.1:browser.py:666:_change_location There isn't any page corresponding to URL https://www.paypal.com/myaccount/?nav=0.0
Debug data will be saved in this directory: /tmp/weboob_session_aAEzAd
2014-11-04 18:37:11,902:WARNING:backend.paypal.browser:1.1:browser.py:309:save_response Response saved to /tmp/weboob_session_aAEzAd/0.html
2014-11-04 18:37:12,861:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=**********] Went on https://www.paypal.com/businessexp/money
2014-11-04 18:37:12,863:DEBUG:bcall:1.1:bcall.py:87:backend_process <Backend 'paypal'>: Called function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7fe92e46bc50>> raised an error: IndexError('list index out of range',)
Bug(paypal): list index out of range
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/weboob-1.1-py2.7.egg/weboob/core/bcall.py", line 83, in backend_process
    result = function(backend, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/weboob-1.1-py2.7.egg/weboob/tools/application/base.py", line 305, in _do_complete
    res = getattr(backend, function)(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/weboob-1.1-py2.7.egg/weboob/capabilities/bank.py", line 204, in iter_resources
    return self.iter_accounts()
  File "/home/toto/weboob/modules/paypal/module.py", line 47, in iter_accounts
    return self.browser.get_accounts().itervalues()
  File "/home/toto/weboob/modules/paypal/browser.py", line 90, in get_accounts
    return self.page.get_accounts()
  File "/home/toto/weboob/modules/paypal/newpages.py", line 44, in get_accounts
    balance = self.parser.tocleanstring(content.xpath('.//div[@class="col-md-6 available  "]')[0])
IndexError: list index out of range

------------------------------------------+----------+----------
                                    Total       0.00       0.00

Associated revisions

Revision 49613aa1f8efb7c137aee8c18c9740b6ee74add3
Added by Romain Bignon over 2 years ago

fix crash on new accounts list (closes #1654)

History

Updated by Jean-Philippe Dutreve over 2 years ago

I confirm this bug.

Updated by leto 2 over 2 years ago

Update:

boobank -b paypal -d
2014-11-05 20:19:32,731:DEBUG:modules:1.1:modules.py:161:load_module Loaded module "paypal" from /home/toto/weboob/modules/paypal
2014-11-05 20:19:32,732:DEBUG:backend:1.1:modules.py:98:create_instance Created backend "paypal" for module "paypal" 
Welcome to boobank v1.1

Copyright(C) 2010-2014 Romain Bignon, Christophe Benz
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Type "help" to display available commands.

Loaded backends: paypal

boobank> ls
                 Account                     Balance    Coming 
------------------------------------------+----------+----------
2014-11-05 20:19:34,792:DEBUG:bcall:1.1:bcall.py:81:backend_process <Backend 'paypal'>: Calling function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7fa81248fc50>>
2014-11-05 20:19:35,577:DEBUG:backend.paypal.browser:1.1:browser.py:405:lowsslcheck Found 96753399cf183334cef00a72719ea8e13cfe68d1e953006348f41f884180de15 as certificate hash
2014-11-05 20:19:37,317:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=*****************] Went on https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-run
2014-11-05 20:19:37,494:DEBUG:backend.paypal.browser:1.1:browser.py:680:_change_location !! Relogin !!
2014-11-05 20:19:41,180:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=*****************] Went on https://www.paypal.com/fr/cgi-bin/webscr?cmd=_login-processing&login_cmd=_login-done&login_access=**********
2014-11-05 20:19:45,384:WARNING:backend.paypal.browser:1.1:browser.py:666:_change_location There isn't any page corresponding to URL https://www.paypal.com/myaccount/?nav=0.0
Debug data will be saved in this directory: /tmp/weboob_session_Z5EuLX
2014-11-05 20:19:45,726:WARNING:backend.paypal.browser:1.1:browser.py:309:save_response Response saved to /tmp/weboob_session_Z5EuLX/0.html
2014-11-05 20:19:47,606:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=*****************] Went on https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-run
2014-11-05 20:19:49,240:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=*****************] Went on https://www.paypal.com/businessexp/money
2014-11-05 20:19:49,244:DEBUG:bcall:1.1:bcall.py:87:backend_process <Backend 'paypal'>: Called function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7fa81248fc50>> raised an error: IndexError('list index out of range',)
Bug(paypal): list index out of range
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/weboob-1.1-py2.7.egg/weboob/core/bcall.py", line 83, in backend_process
    result = function(backend, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/weboob-1.1-py2.7.egg/weboob/tools/application/base.py", line 305, in _do_complete
    res = getattr(backend, function)(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/weboob-1.1-py2.7.egg/weboob/capabilities/bank.py", line 204, in iter_resources
    return self.iter_accounts()
  File "/home/toto/weboob/modules/paypal/module.py", line 47, in iter_accounts
    return self.browser.get_accounts().itervalues()
  File "/home/toto/weboob/modules/paypal/browser.py", line 91, in get_accounts
    return self.page.get_accounts()
  File "/home/toto/weboob/modules/paypal/newpages.py", line 42, in get_accounts
    balance = self.parser.tocleanstring(content.xpath('.//div[@class="col-md-6 available  "]')[0])
IndexError: list index out of range

------------------------------------------+----------+----------
                                    Total       0.00       0.00

Updated by Romain Bignon over 2 years ago

I think you should use the has-class function in your xpath instead, to prevent issues with trailing spaces.

Updated by Romain Bignon over 2 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Updated by leto 2 over 2 years ago

Not resolved for me:

boobank -b paypal -d
2014-11-16 20:02:00,181:DEBUG:modules:1.1:modules.py:161:load_module Loaded module "paypal" from /home/toto/weboob/modules/paypal
2014-11-16 20:02:00,181:DEBUG:backend:1.1:modules.py:98:create_instance Created backend "paypal" for module "paypal" 
Welcome to boobank v1.1

Copyright(C) 2010-2014 Romain Bignon, Christophe Benz
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Type "help" to display available commands.

Loaded backends: paypal

boobank> ls
                 Account                     Balance    Coming 
------------------------------------------+----------+----------
2014-11-16 20:02:08,858:DEBUG:bcall:1.1:bcall.py:81:backend_process <Backend 'paypal'>: Calling function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7f5a5c319c50>>
2014-11-16 20:02:14,379:DEBUG:backend.paypal.browser:1.1:browser.py:405:lowsslcheck Found b8f6c76050ed3035aab08474b1da0ff783f20d114b1740e8db275fe433ff69af as certificate hash
2014-11-16 20:02:15,473:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-run
2014-11-16 20:02:15,483:DEBUG:backend.paypal.browser:1.1:browser.py:680:_change_location !! Relogin !!
2014-11-16 20:02:18,057:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/fr/cgi-bin/webscr?cmd=_login-processing&login_cmd=_login-done&login_access=**********
2014-11-16 20:02:20,271:WARNING:backend.paypal.browser:1.1:browser.py:666:_change_location There isn't any page corresponding to URL https://www.paypal.com/myaccount/?nav=0.0
Debug data will be saved in this directory: /tmp/weboob_session_b_Hvm9
2014-11-16 20:02:21,495:WARNING:backend.paypal.browser:1.1:browser.py:309:save_response Response saved to /tmp/weboob_session_b_Hvm9/0.html
2014-11-16 20:02:22,683:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-run
2014-11-16 20:02:23,590:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/businessexp/money
2014-11-16 20:02:23,594:DEBUG:bcall:1.1:bcall.py:90:backend_process <Backend 'paypal'>: Called function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7f5a5c319c50>> returned: <generator object _do_complete_iter at 0x7f5a58627f50>
 #1 (paypal)     mail@domaine.com       0.00  
------------------------------------------+----------+----------
                                    Total       0.00       0.00
boobank> history 1
 Date         Category     Label                                                  Amount 
------------+------------+---------------------------------------------------+-----------
2014-11-16 20:02:28,224:DEBUG:bcall:1.1:bcall.py:81:backend_process <Backend 'paypal'>: Calling function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7f5a5c319c50>>
2014-11-16 20:02:28,225:DEBUG:bcall:1.1:bcall.py:90:backend_process <Backend 'paypal'>: Called function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7f5a5c319c50>> returned: <generator object _do_complete_iter at 0x7f5a5bfc71e0>
2014-11-16 20:02:31,625:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/myaccount/
2014-11-16 20:02:35,564:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/myaccount/
2014-11-16 20:02:39,832:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/myaccount/
2014-11-16 20:02:44,128:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/myaccount/
2014-11-16 20:02:47,208:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/myaccount/
2014-11-16 20:02:50,260:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/myaccount/
2014-11-16 20:02:53,604:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/myaccount/
2014-11-16 20:02:57,066:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/myaccount/
2014-11-16 20:03:00,131:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/myaccount/
2014-11-16 20:03:03,671:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/myaccount/
2014-11-16 20:03:07,283:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/myaccount/
2014-11-16 20:03:11,470:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/webapps/business/activity?fromdate=21/11/2011&todate=19/02/2012&transactiontype=ALL_TRANSACTIONS&currency=ALL_TRANSACTIONS_CURRENCY&limit=9999
2014-11-16 20:03:13,019:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/webapps/business/activity?fromdate=24/05/2011&todate=20/11/2011&transactiontype=ALL_TRANSACTIONS&currency=ALL_TRANSACTIONS_CURRENCY&limit=9999
 2011-10-27                Paiement de *****                            42.00
 2011-05-29                Paiement à *****                         -34.00
 2011-05-26                Paiement à *****                     -57.00
2014-11-16 20:03:14,312:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/webapps/business/activity?fromdate=22/02/2011&todate=23/05/2011&transactiontype=ALL_TRANSACTIONS&currency=ALL_TRANSACTIONS_CURRENCY&limit=9999
 2011-03-08                Paiement à *****                               -22.90
2014-11-16 20:03:15,366:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/webapps/business/activity?fromdate=23/11/2010&todate=21/02/2011&transactiontype=ALL_TRANSACTIONS&currency=ALL_TRANSACTIONS_CURRENCY&limit=9999
 2011-02-11                Paiement à *****                        -17.00
2014-11-16 20:03:16,321:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/webapps/business/activity?fromdate=24/08/2010&todate=22/11/2010&transactiontype=ALL_TRANSACTIONS&currency=ALL_TRANSACTIONS_CURRENCY&limit=9999
2014-11-16 20:03:17,153:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/webapps/business/activity?fromdate=24/02/2010&todate=23/08/2010&transactiontype=ALL_TRANSACTIONS&currency=ALL_TRANSACTIONS_CURRENCY&limit=9999
 2010-07-19                Paiement à *****                              -30.00
2014-11-16 20:03:18,241:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=mail@domaine.com] Went on https://www.paypal.com/webapps/business/activity?fromdate=25/11/2009&todate=23/02/2010&transactiontype=ALL_TRANSACTIONS&currency=ALL_TRANSACTIONS_CURRENCY&limit=9999
Bug(paypal): unknown string format
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/weboob-1.1-py2.7.egg/weboob/core/bcall.py", line 95, in backend_process
    for subresult in result:
  File "/usr/local/lib/python2.7/dist-packages/weboob-1.1-py2.7.egg/weboob/tools/application/base.py", line 284, in _do_complete_iter
    for i, sub in enumerate(res):
  File "/home/toto/weboob/modules/paypal/module.py", line 59, in iter_history
    for history in self.browser.get_download_history(account):
  File "/home/toto/weboob/modules/paypal/browser.py", line 144, in get_download_history
    fetch_fn=fetch_fn):
  File "/home/toto/weboob/modules/paypal/browser.py", line 165, in smart_fetch
    for trans in chunk:
  File "/home/toto/weboob/modules/paypal/newpages.py", line 57, in iter_transactions
    for trans in self.parse():
  File "/home/toto/weboob/modules/paypal/newpages.py", line 64, in parse
    date = parse_french_date(tr.xpath('./td[@class="date"]')[0].text.strip())
  File "/usr/local/lib/python2.7/dist-packages/weboob-1.1-py2.7.egg/weboob/tools/date.py", line 276, in parse_french_date
    return dateutil.parser.parse(date)
  File "/usr/lib/python2.7/dist-packages/dateutil/parser.py", line 697, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
  File "/usr/lib/python2.7/dist-packages/dateutil/parser.py", line 303, in parse
    raise ValueError, "unknown string format" 
ValueError: unknown string format

Updated by leto 2 over 2 years ago

Another error:AttributeError: 'NoneType' object has no attribute 'transaction_left'

boobank -d -b paypal
2014-11-20 14:38:10,042:DEBUG:modules:1.1:modules.py:161:load_module Loaded module "paypal" from /home/toto/weboob/modules/paypal
2014-11-20 14:38:10,042:DEBUG:backend:1.1:modules.py:98:create_instance Created backend "paypal" for module "paypal" 
Welcome to boobank v1.1

Copyright(C) 2010-2014 Romain Bignon, Christophe Benz
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Type "help" to display available commands.

Loaded backends: paypal

boobank> ls
                 Account                     Balance    Coming 
------------------------------------------+----------+----------
2014-11-20 14:38:11,782:DEBUG:bcall:1.1:bcall.py:81:backend_process <Backend 'paypal'>: Calling function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7f9b6ef49c50>>
2014-11-20 14:38:11,986:DEBUG:backend.paypal.browser:1.1:browser.py:405:lowsslcheck Found b8f6c76050ed3035aab08474b1da0ff783f20d114b1740e8db275fe433ff69af as certificate hash
2014-11-20 14:38:13,271:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=**********] Went on https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-run
2014-11-20 14:38:13,326:DEBUG:backend.paypal.browser:1.1:browser.py:680:_change_location !! Relogin !!
2014-11-20 14:38:16,831:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=**********] Went on https://www.paypal.com/fr/cgi-bin/webscr?cmd=_login-processing&login_cmd=_login-done&login_access=**********
2014-11-20 14:38:19,531:WARNING:backend.paypal.browser:1.1:browser.py:666:_change_location There isn't any page corresponding to URL https://www.paypal.com/myaccount/?nav=0.0
Debug data will be saved in this directory: /tmp/weboob_session_Z4V1Zx
2014-11-20 14:38:19,671:WARNING:backend.paypal.browser:1.1:browser.py:309:save_response Response saved to /tmp/weboob_session_Z4V1Zx/0.html
2014-11-20 14:38:21,135:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=**********] Went on https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-run
2014-11-20 14:38:22,178:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=**********] Went on https://www.paypal.com/businessexp/money
2014-11-20 14:38:22,182:DEBUG:bcall:1.1:bcall.py:90:backend_process <Backend 'paypal'>: Called function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7f9b6ef49c50>> returned: <generator object _do_complete_iter at 0x7f9b6b257f50>
 #1 (paypal)     **********       0.00  
------------------------------------------+----------+----------
                                    Total       0.00       0.00
boobank> history 1
 Date         Category     Label                                                  Amount 
------------+------------+---------------------------------------------------+-----------
2014-11-20 16:13:02,341:DEBUG:bcall:1.1:bcall.py:81:backend_process <Backend 'paypal'>: Calling function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7f9b6ef49c50>>
2014-11-20 16:13:02,341:DEBUG:bcall:1.1:bcall.py:90:backend_process <Backend 'paypal'>: Called function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7f9b6ef49c50>> returned: <generator object _do_complete_iter at 0x7f9b6ebf7140>
2014-11-20 16:13:07,453:WARNING:backend.paypal.browser:1.1:browser.py:666:_change_location There isn't any page corresponding to URL https://www.paypal.com/fr/cgi-bin/webscr?cmd=_spartarapidsentrypoint-webscr&rapids_flow_token=c6Elf7v9AqgFnH41GpLt69T-oGinSEykflMVNSfJ-GK_qfVHo2m9q7uL1_3DVqYyo9E6gUAeR0zGTpwhgs0LTxAQCZIuaqBfsP60RRoxhd5Lh8Kw7PnnkAOcBTjOmWhVbnG-ydMWGk7ZGftoK22cM3BNZ7LLzTqgMbINPxUYheFjIFfyofFM_9IJ4H2ufhm5LjOyns8MLOtWmmCvo3Yaf_01Mi8BZE-QGpeR9z0c006ti1G8ZSpNDAlo8pgaYwQjJqST_a7pJFRki7X7GvjGW8vMI3xqjUDdL5Jgee-S62owoLFzIEsZYTEBhOqQvt8muPKWeeB5Ud0jHRz9aMOp6rZ8iUQiMecBn6mMMNPX7g2D9TrvTeer20CygvrMaj5ws-E_63-cdAMLYENmywua8YfV6sm&msg_token=rWs6tuaS86hOKKlwifiJvoGDN-twr8TTkzX1O8GbFjv6Te3nnTVjrTTxhjQKSijP4uc672NBKf_By1M2iQHJcZQQyLYuIAOINVJAe8U1-wgG0TBZwrQym5ckGo0MHAT0A5Ov5uPUmqzhj4MOmquxc1lC9sS
2014-11-20 16:13:07,584:WARNING:backend.paypal.browser:1.1:browser.py:309:save_response Response saved to /tmp/weboob_session_Z4V1Zx/1.html
Bug(paypal): 'NoneType' object has no attribute 'transaction_left'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/weboob-1.1-py2.7.egg/weboob/core/bcall.py", line 95, in backend_process
    for subresult in result:
  File "/usr/local/lib/python2.7/dist-packages/weboob-1.1-py2.7.egg/weboob/tools/application/base.py", line 284, in _do_complete_iter
    for i, sub in enumerate(res):
  File "/home/toto/weboob/modules/paypal/module.py", line 59, in iter_history
    for history in self.browser.get_download_history(account):
  File "/home/toto/weboob/modules/paypal/browser.py", line 144, in get_download_history
    fetch_fn=fetch_fn):
  File "/home/toto/weboob/modules/paypal/browser.py", line 159, in smart_fetch
    chunk = fetch_fn(start, end)
  File "/home/toto/weboob/modules/paypal/browser.py", line 136, in fetch_fn
    elif self.download_history(start, end):
  File "/home/toto/weboob/modules/paypal/browser.py", line 190, in download_history
    return self.page.transaction_left()
AttributeError: 'NoneType' object has no attribute 'transaction_left'

Updated by leto 2 over 2 years ago

boobank -d -b paypal
2014-11-26 14:40:32,311:DEBUG:modules:1.1:modules.py:161:load_module Loaded module "paypal" from /home/toto/weboob/modules/paypal
2014-11-26 14:40:32,312:DEBUG:backend:1.1:modules.py:98:create_instance Created backend "paypal" for module "paypal" 
Welcome to boobank v1.1

Copyright(C) 2010-2014 Romain Bignon, Christophe Benz
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Type "help" to display available commands.

Loaded backends: paypal

boobank> ls
                 Account                     Balance    Coming 
------------------------------------------+----------+----------
2014-11-26 14:40:36,253:DEBUG:bcall:1.1:bcall.py:81:backend_process <Backend 'paypal'>: Calling function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7f125581bc50>>
2014-11-26 14:40:38,258:DEBUG:backend.paypal.browser:1.1:browser.py:405:lowsslcheck Found b8f6c76050ed3035aab08474b1da0ff783f20d114b1740e8db275fe433ff69af as certificate hash
2014-11-26 14:40:40,821:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=**********] Went on https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-run
2014-11-26 14:40:41,460:DEBUG:backend.paypal.browser:1.1:browser.py:680:_change_location !! Relogin !!
2014-11-26 14:40:46,893:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=**********] Went on https://www.paypal.com/fr/cgi-bin/webscr?cmd=_login-processing&login_cmd=_login-done&login_access=**********
*2014-11-26 14:40:50,587:WARNING:backend.paypal.browser:1.1:browser.py:666:_change_location There isn't any page corresponding to URL https://www.paypal.com/myaccount/?nav=0.0*
Debug data will be saved in this directory: /tmp/weboob_session_9xUZE3
2014-11-26 14:40:51,068:WARNING:backend.paypal.browser:1.1:browser.py:309:save_response Response saved to /tmp/weboob_session_9xUZE3/0.html
2014-11-26 14:40:57,022:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=**********] Went on https://www.paypal.com/myaccount/
2014-11-26 14:40:59,732:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=**********] Went on https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-run
2014-11-26 14:41:01,635:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=**********] Went on https://www.paypal.com/businessexp/money
2014-11-26 14:41:01,639:DEBUG:bcall:1.1:bcall.py:90:backend_process <Backend 'paypal'>: Called function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7f125581bc50>> returned: <generator object _do_complete_iter at 0x7f1251b37870>
 #1 (paypal)     **********       0.00  
------------------------------------------+----------+----------
                                    Total       0.00       0.00
boobank> history 1
 Date         Category     Label                                                  Amount 
------------+------------+---------------------------------------------------+-----------
2014-11-26 14:41:05,976:DEBUG:bcall:1.1:bcall.py:81:backend_process <Backend 'paypal'>: Calling function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7f125581bc50>>
2014-11-26 14:41:05,977:DEBUG:bcall:1.1:bcall.py:90:backend_process <Backend 'paypal'>: Called function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7f125581bc50>> returned: <generator object _do_complete_iter at 0x7f12554c3230>
2014-11-26 14:41:07,894:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=**********] Went on https://www.paypal.com/myaccount/activity/filter?start=28/08/2014&end=26/11/2014&limit=9999
[liste sans bug des dernières opérations]
2014-11-26 14:41:09,325:DEBUG:backend.paypal.browser:1.1:browser.py:670:_change_location [user_id=**********] Went on https://www.paypal.com/myaccount/activity/filter?start=29/05/2014&end=27/08/2014&limit=9999
Hint: There are more results available for paypal (use option -n or count command)
boobank> 

Updated by Romain Bignon about 2 years ago

  • Target version set to 1.1

Also available in: Atom PDF