Docker image : python3-pdfminer dependency is missing ?
Bug report
I have an error for La Banque Postal account. I use the nightly docker image. I think the pdfminer dependency is missing in the docker build.
Woob's version I am using is: 3.1
Kresus's version I am using is: 0.18.0
Docker image : bnjbvr/kresus-nightly:prod
Server logs (if apply):
[2022-05-31T03:52:32.606] [ERROR] providers/woob - Got error while running command "accounts": Unknown error: Please install python3-pdfminer to parse PDF.
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pdfminer/image.py", line 8, in <module>
from typing import Literal
ImportError: cannot import name 'Literal' from 'typing' (/usr/lib/python3.7/typing.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/woob/woob/tools/pdf.py", line 527, in extract_text
from pdfminer.converter import TextConverter
File "/usr/local/lib/python3.7/dist-packages/pdfminer/converter.py", line 20, in <module>
from .image import ImageWriter
File "/usr/local/lib/python3.7/dist-packages/pdfminer/image.py", line 10, in <module>
from typing_extensions import Literal # type: ignore[misc]
ModuleNotFoundError: No module named 'typing_extensions'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/app/build/server/providers/woob/py/main.py", line 704, in fetch
results['values'] = self.get_accounts()
File "/home/user/app/build/server/providers/woob/py/main.py", line 554, in get_accounts
for account in list(self.backend.iter_accounts()):
File "/home/user/data/woob-data/modules/3.1/woob_modules/bp/module.py", line 81, in iter_accounts
return self.browser.get_accounts_list()
File "/woob/woob/browser/browsers.py", line 998, in inner
return func(browser, *args, **kwargs)
File "/home/user/data/woob-data/modules/3.1/woob_modules/bp/browser.py", line 578, in get_accounts_list
for account in self.page.iter_accounts(name=owner_name):
File "/woob/woob/browser/elements.py", line 232, in __iter__
for obj in item:
File "/woob/woob/browser/elements.py", line 377, in __iter__
self.handle_attr(attr, getattr(self, 'obj_%s' % attr))
File "/woob/woob/browser/elements.py", line 394, in handle_attr
value = self.use_selector(func, key=key)
File "/woob/woob/browser/elements.py", line 147, in use_selector
value = func()
File "/home/user/data/woob-data/modules/3.1/woob_modules/bp/pages/accountlist.py", line 202, in obj_iban
return response.page.get_iban()
File "/home/user/data/woob-data/modules/3.1/woob_modules/bp/pages/accountlist.py", line 610, in get_iban
content = extract_text(self.data)
File "/woob/woob/tools/pdf.py", line 530, in extract_text
raise ImportError('Please install python3-pdfminer to parse PDF')
ImportError: Please install python3-pdfminer to parse PDF
Edited by Olivier Galy