[boursorama] FormatError: Unable to parse u''
Hello,
I encounter this issue with boursorama for a few weeks, now I file this bug report
Reproduced with boobank here.
Auto-update is enabled (and triggered an update):
A new version of boursorama is available. Do you want to install it? (Y/n):
=== [ 30%] A new version of boursorama is available
=== [ 20%] Downloading module...
2019-09-22 17:50:18,555:DEBUG:urllib3.connectionpool:1.5:connectionpool.py:393:_make_request https://updates.weboob.org:443 "GET /1.5/main/boursorama.tar.gz HTTP/1.1" 200 22680
=== [ 50%] Checking module authenticity...
2019-09-22 17:50:18,609:DEBUG:urllib3.connectionpool:1.5:connectionpool.py:393:_make_request https://updates.weboob.org:443 "GET /1.5/main/boursorama.tar.gz.sig HTTP/1.1" 200 310
=== [ 70%] Setting up module...
=== [ 90%] Downloading icon...
2019-09-22 17:50:19,004:DEBUG:urllib3.connectionpool:1.5:connectionpool.py:393:_make_request https://updates.weboob.org:443 "GET /1.5/main/boursorama.png HTTP/1.1" 200 15712
=== [100%] Module boursorama has been installed!
New version of module boursorama has been installed. Retry to call the command.
boobank>
"list" shows both the bank account and the CARD (deferred) account.
"history 1" works fine.
"history 2" returns this error (IDs redacted):
boobank> history 2
2019-09-22 18:00:27,929:DEBUG:bcall:1.5:bcall.py:92:backend_process <Backend u'boursorama'>: Calling function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7fb13e516a90>>
2019-09-22 18:00:27,932:DEBUG:bcall:1.5:bcall.py:101:backend_process <Backend u'boursorama'>: Called function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7fb13e516a90>> returned: <Account id=u'9bc1b37578c0deadc0b03041e3ba8b9e' label=u'CARTE VISA PREMIER - MR XXX'>
Date Category Label Amount
------------+------------+---------------------------------------------------+-----------
2019-09-22 18:00:27,938:DEBUG:bcall:1.5:bcall.py:92:backend_process <Backend u'boursorama'>: Calling function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7fb13e516a90>>
2019-09-22 18:00:27,939:DEBUG:bcall:1.5:bcall.py:101:backend_process <Backend u'boursorama'>: Called function <bound method Boobank._do_complete of <weboob.applications.boobank.boobank.Boobank object at 0x7fb13e516a90>> returned: <generator object _do_complete_iter at 0x7fb137bfa320>
2019-09-22 18:00:28,159:DEBUG:urllib3.connectionpool:1.5:connectionpool.py:393:_make_request https://clients.boursorama.com:443 "GET /compte/cav/5ac5787e8c35be108edeada05e710d7b/carte/9bc1b37578c0deadc0b03041e3ba8b9e HTTP/1.1" 200 None
2019-09-22 18:00:28,231:DEBUG:backend.boursorama.browser:1.5:browsers.py:694:internal_callback Handle https://clients.boursorama.com/compte/cav/5ac5787e8c35be108edeada05e710d7b/carte/9bc1b37578c0deadc0b03041e3ba8b9e with HistoryPage
2019-09-22 18:00:28,414:DEBUG:urllib3.connectionpool:1.5:connectionpool.py:393:_make_request https://clients.boursorama.com:443 "GET /compte/cav/5ac5787e8c35be108edeada05e710d7b/carte/9bc1b37578c0deadc0b03041e3ba8b9e/calendrier HTTP/1.1" 200 None
2019-09-22 18:00:28,457:DEBUG:backend.boursorama.browser:1.5:browsers.py:694:internal_callback Handle https://clients.boursorama.com/compte/cav/5ac5787e8c35be108edeada05e710d7b/carte/9bc1b37578c0deadc0b03041e3ba8b9e/calendrier with CalendarPage
2019-09-22 18:00:28,785:DEBUG:urllib3.connectionpool:1.5:connectionpool.py:393:_make_request https://clients.boursorama.com:443 "GET /compte/cav/5ac5787e8c35be108edeada05e710d7b/carte/calendrier.ics HTTP/1.1" 302 None
2019-09-22 18:00:29,099:DEBUG:urllib3.connectionpool:1.5:connectionpool.py:393:_make_request https://api.boursorama.com:443 "GET /services/api/files/download.phtml?token=6d4b599ccd3cc6f552901adc5f5125f371ccbcb0bcdbdead749209a3e2a9b9a3 HTTP/1.1" 200 33580
2019-09-22 18:00:29,113:DEBUG:backend.boursorama.browser:1.5:browsers.py:694:internal_callback Handle https://api.boursorama.com/services/api/files/download.phtml?token=6d4b599ccd3cc6f552901adc5f5125f371ccbcb0bcdbdead749209a3e2a9b9a3 with CardCalendarPage
2019-09-22 18:00:30,196:DEBUG:urllib3.connectionpool:1.5:connectionpool.py:393:_make_request https://clients.boursorama.com:443 "GET /compte/cav/5ac5787e8c35be108edeada05e710d7b/carte/9bc1b37578c0deadc0b03041e3ba8b9e?fullSearch=1&movementSearch%5BfromDate%5D=22%2F09%2F2016 HTTP/1.1" 200 None
2019-09-22 18:00:30,278:DEBUG:backend.boursorama.browser:1.5:browsers.py:694:internal_callback Handle https://clients.boursorama.com/compte/cav/5ac5787e8c35be108edeada05e710d7b/carte/9bc1b37578c0deadc0b03041e3ba8b9e?fullSearch=1&movementSearch%5BfromDate%5D=22%2F09%2F2016 with HistoryPage
2019-09-22 18:00:32,752:DEBUG:urllib3.connectionpool:1.5:connectionpool.py:393:_make_request https://clients.boursorama.com:443 "GET /budget/exporter-mouvements?movementSearch%5BfromDate%5D=22/09/2016&deferredCardKey=9bc1b37578c0deadc0b03041e3ba8b9e HTTP/1.1" 302 None
2019-09-22 18:00:33,056:DEBUG:urllib3.connectionpool:1.5:connectionpool.py:393:_make_request https://api.boursorama.com:443 "GET /services/api/files/download.phtml?token=fc732a9586b7973e4cacc03f585171eb5bef4c3af30fdead2fe53ad565c25b5b HTTP/1.1" 200 20160
2019-09-22 18:00:33,086:DEBUG:backend.boursorama.browser:1.5:browsers.py:694:internal_callback Handle https://api.boursorama.com/services/api/files/download.phtml?token=fc732a9586b7973e4cacc03f585171eb5bef4c3af30fdead2fe53ad565c25b5b with CardHistoryPage
2019-09-22 18:00:33,365:WARNING:item:1.5:elements.py:370:handle_attr Attribute date (in /data/modules/1.5/boursorama/pages.py:566) raises FormatError("Unable to parse u''",)
Bug(boursorama): Unable to parse u''
(If --auto-update is passed on the command-line, new versions of the module will be checked automatically)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/weboob/core/bcall.py", line 106, in backend_process
for subresult in result:
File "/usr/local/lib/python2.7/site-packages/weboob/tools/application/base.py", line 289, in _do_complete_iter
for i, sub in enumerate(res):
File "/data/modules/1.5/boursorama/module.py", line 68, in iter_history
for tr in self.browser.get_history(account):
File "/usr/local/lib/python2.7/site-packages/weboob/browser/retry.py", line 170, in __next__
obj = next(self.it)
File "/data/modules/1.5/boursorama/browser.py", line 368, in get_card_transactions
for tr in sorted_transactions(self.page.iter_history(account_number=account.number)):
File "/usr/local/lib/python2.7/site-packages/weboob/tools/capabilities/bank/transactions.py", line 359, in sorted_transactions
return sorted(iterable, reverse=True, key=lambda tr: (tr.date, new_datetime(tr.rdate) if tr.rdate else datetime.datetime.min))
File "/usr/local/lib/python2.7/site-packages/weboob/browser/elements.py", line 203, in __iter__
for obj in item:
File "/usr/local/lib/python2.7/site-packages/weboob/browser/elements.py", line 346, in __iter__
self.handle_attr(attr, getattr(self, 'obj_%s' % attr))
File "/usr/local/lib/python2.7/site-packages/weboob/browser/elements.py", line 363, in handle_attr
value = self.use_selector(func, key=key)
File "/usr/local/lib/python2.7/site-packages/weboob/browser/elements.py", line 123, in use_selector
value = func(self)
File "/usr/local/lib/python2.7/site-packages/weboob/browser/filters/base.py", line 184, in __call__
return self.filter(self.select(self.selector, item))
File "/usr/local/lib/python2.7/site-packages/weboob/browser/filters/base.py", line 133, in print_debug
res = function(self, value)
File "/usr/local/lib/python2.7/site-packages/weboob/browser/filters/standard.py", line 740, in filter
datetime = super(Date, self).filter(txt)
File "/usr/local/lib/python2.7/site-packages/weboob/browser/filters/base.py", line 133, in print_debug
res = function(self, value)
File "/usr/local/lib/python2.7/site-packages/weboob/browser/filters/standard.py", line 720, in filter
return self.default_or_raise(FormatError('Unable to parse %r' % txt))
File "/usr/local/lib/python2.7/site-packages/weboob/browser/filters/base.py", line 71, in default_or_raise
raise exception
FormatError: Unable to parse u''
boobank>
Can you please help?
--Camille