MoritzR / fints2ledger

A tool for downloading transactions from FinTS banking APIs and sorting them into a ledger journal
MIT License
27 stars 8 forks source link

Can't fetch GLS trancactions anymore #15

Closed varac closed 3 years ago

varac commented 3 years ago

Until today I was able to fetch transactions just fine with fints2ledger 0.6.0. Today I can't anymore:

❯ fints2ledger --csv-file /home/varac/.config/fints2ledger/transactions-giro.csv --ledger-file /home/varac/beancount/journals/fints2ledger-giro.beancount --date 2020/12/01
You should register your program with the ZKA and pass your own product_id as a parameter.
Dialog response: 9050 - Die Nachricht enthält Fehler.
Dialog response: 9800 - Dialog abgebrochen
Dialog response: 9340 - Auftrag abgelehnt.
Traceback (most recent call last):
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints/client.py", line 453, in get_sepa_accounts
    return self._send_with_possible_retry(dialog, seg, self._get_sepa_accounts)
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints/client.py", line 1234, in _send_with_possible_retry
    response = dialog.send(command_seg)
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints/dialog.py", line 156, in send
    self.client.process_response_message(self, response, internal_send=internal_send)
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints/client.py", line 230, in process_response_message
    self._process_response(dialog, None, response)
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints/client.py", line 1294, in _process_response
    raise FinTSClientPINError("Error during dialog initialization, PIN wrong?")
fints.exceptions.FinTSClientPINError: Error during dialog initialization, PIN wrong?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/varac/.local/bin/fints2ledger", line 8, in <module>
    sys.exit(main())
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints2ledger/main.py", line 9, in main
    Fints2Csv(config).retrieveAndSave()
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints2ledger/fints2csv.py", line 24, in retrieveAndSave
    transaction), retriever.get_hbci_transactions(self.config["fints"]["start"], Date.today())))
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints2ledger/transaction_retriever.py", line 7, in get_hbci_transactions
    accounts = self.client.get_sepa_accounts()
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints/client.py", line 453, in get_sepa_accounts
    return self._send_with_possible_retry(dialog, seg, self._get_sepa_accounts)
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints/dialog.py", line 45, in __exit__
    self.end()
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints/dialog.py", line 112, in end
    response = self.send(HKEND1(self.dialog_id), internal_send=True)
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints/dialog.py", line 131, in send
    self.finish_message(message)
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints/dialog.py", line 178, in finish_message
    auth_mech.sign_commit(message)
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints/security.py", line 157, in sign_commit
    user_defined_signature=UserDefinedSignature(
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints/types.py", line 360, in __init__
    setattr(self, k, v)
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints/types.py", line 45, in __set__
    value_ = self._parse_value(value)
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints/fields.py", line 299, in _parse_value
    return Password(value)
  File "/home/varac/.local/pipx/venvs/fints2ledger/lib/python3.8/site-packages/fints/utils.py", line 260, in __str__
    raise Exception("Refusing to use PIN after block")
Exception: Refusing to use PIN after block

Right after this Exception, I get a useless PIN sent to my phone.

I upgraded to 0.6.1 but this didn't help neither. Any ideas what's wrong ?

varac commented 3 years ago

Nevermind, after logging in to the bank using 2fa it worked again.