jHetzer / erpnextfints

FinTS Connector for ERPNext (Germany)
MIT License
34 stars 23 forks source link

Error when logging in #60

Open wojosc opened 1 year ago

wojosc commented 1 year ago

I have all the necessary data for logging into my back account but get the following error:

Traceback (most recent call last):
  File "apps/erpnextfints/erpnextfints/utils/fints_controller.py", line 84, in __get_fints_accounts
    self.fints_accounts = self.fints_connection.get_sepa_accounts()
  File "env/lib/python3.10/site-packages/fints/client.py", line 453, in get_sepa_accounts
    return self._send_with_possible_retry(dialog, seg, self._get_sepa_accounts)
  File "env/lib/python3.10/site-packages/fints/client.py", line 1243, in _send_with_possible_retry
    response = dialog.send(command_seg)
  File "env/lib/python3.10/site-packages/fints/dialog.py", line 156, in send
    self.client.process_response_message(self, response, internal_send=internal_send)
  File "env/lib/python3.10/site-packages/fints/client.py", line 230, in process_response_message
    self._process_response(dialog, None, response)
  File "env/lib/python3.10/site-packages/fints/client.py", line 1293, in _process_response
    raise FinTSClientError("Error during dialog initialization, could not fetch BPD. Please check that you "
fints.exceptions.FinTSClientError: Error during dialog initialization, could not fetch BPD. Please check that you passed the correct bank identifier to the HBCI URL of the correct bank.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 95, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 47, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1622, in call
    return fn(*args, **newargs)
  File "apps/erpnextfints/erpnextfints/utils/client.py", line 42, in get_accounts
    "accounts": FinTSController(
  File "apps/erpnextfints/erpnextfints/utils/fints_controller.py", line 33, in __init__
    self.__get_fints_accounts()
  File "apps/erpnextfints/erpnextfints/utils/fints_controller.py", line 86, in __get_fints_accounts
    frappe.throw(_(
  File "apps/frappe/frappe/__init__.py", line 534, in throw
    msgprint(
  File "apps/frappe/frappe/__init__.py", line 502, in msgprint
    _raise_exception()
  File "apps/frappe/frappe/__init__.py", line 451, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.ValidationError: Could not load sepa accounts with error:<br>Error during dialog initialization, could not fetch BPD. Please check that you passed the correct bank identifier to the HBCI URL of the correct bank.

Could not load sepa accounts with error:
Error during dialog initialization, could not fetch BPD. Please check that you passed the correct bank identifier to the HBCI URL of the correct bank.

@jHetzer can you let me know what BPD is so I can further search for a solution? Thank you.

I have used the HBCI URL and the correct BLZ from the excel sheet provided from the place from where I received the registration code.

wojosc commented 1 year ago

from what I understand this has something to do with 2-factor-authentication or PIN/Push2Tan thing... https://github.com/raphaelm/python-fints/issues/106

Will look into this and feedback