Code Monkey home page Code Monkey logo

Comments (12)

grindsa avatar grindsa commented on June 11, 2024

I can confirm that this is a bug. TAN usage requires the legacy UI.

Following workaround should work:

with DKBRobo(dkb_user=DKB_USER, dkb_password=DKB_PASSWORD, tan_insert=True, legacy_login=True) as dkb:
    pprint(dkb.account_dic)

Will meanwhile work on a fix...

from dkb-robo.

hogliux avatar hogliux commented on June 11, 2024

Thank you so much for your quick response. However, when I use legacy UI, I get the following error:

DKBRobo._login()

DKBRobo._new_instance()

Starting new HTTPS connection (1): www.ib.dkb.de:443
https://www.ib.dkb.de:443 "GET /banking HTTP/1.1" 200 None
https://www.ib.dkb.de:443 "POST /banking HTTP/1.1" 200 None
DKBRobo._ctan_check()

Login failed: LinkNotFoundError

from dkb-robo.

grindsa avatar grindsa commented on June 11, 2024

Fixes got released with v0.23.1. Can you please check if you still get the LinkNotFoundError error?

from dkb-robo.

hogliux avatar hogliux commented on June 11, 2024

I'm still getting the LinkNotFoundError. I've modified your code to dump the html page, where soup is looking for the link. I've just invited you to a repo which contains this html page as I don't want to share this html page in the public (it may contain personal information or encoded session tokens etc.).

from dkb-robo.

grindsa avatar grindsa commented on June 11, 2024

Thank you I was about to ask exactly this. Let me look into it later today...

from dkb-robo.

grindsa avatar grindsa commented on June 11, 2024

This looks strange. Can you enable debugging as below and trigger the error and upload the debug log to the repo you created? Can you please further add the dkb_robo.py that I see at which step you dumped the html page?

with DKBRobo(dkb_user=DKB_USER, dkb_password=DKB_PASSWORD, tan_insert=True, legacy_login=True, debug=True) as dkb:
    pprint(dkb.account_dic)

from dkb-robo.

hogliux avatar hogliux commented on June 11, 2024

This is the output:

Traceback (most recent call last):
  File "/home/XXXXX/Developer/dkb-robo/dkb_robo/dkb_robo.py", line 1733, in _legacy_login
    login_confirmed = self._ctan_check(soup)
                      ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/XXXXX/Developer/dkb-robo/dkb_robo/dkb_robo.py", line 1348, in _ctan_check
    self.dkb_br.select_form('form[name="next"]')
  File "/usr/lib/python3/dist-packages/mechanicalsoup/stateful_browser.py", line 207, in select_form
    raise LinkNotFoundError()
mechanicalsoup.utils.LinkNotFoundError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/XXXXX/Developer/dkb-robo/dkb_example.py", line 27, in <module>
    with DKBRobo(dkb_user=DKB_USER, dkb_password=DKB_PASSWORD, tan_insert=True, legacy_login=True, debug=True) as dkb:
  File "/home/XXXXX/Developer/dkb-robo/dkb_robo/dkb_robo.py", line 170, in __enter__
    self._legacy_login()
  File "/home/XXXXX/Developer/dkb-robo/dkb_robo/dkb_robo.py", line 1742, in _legacy_login
    raise DKBRoboError('Login failed: LinkNotFoundError') from err
dkb_robo.dkb_robo.DKBRoboError: Login failed: LinkNotFoundError

from dkb-robo.

hogliux avatar hogliux commented on June 11, 2024

Attached is my modified dkb_robo.py. See lines following 1711
dkb_robo.py.txt

from dkb-robo.

grindsa avatar grindsa commented on June 11, 2024

Thank you. I do not really understand why this happens. This is the code block causing issues. It is true that the link canno tbe found, however the resulting exception. should be catched by the code and just throw an error in the logfile.

Anyway I do not think that this code block is needed anymore so I removed it. Change has been pushed into a separate branch. Can you please try if this fixes your issue (replacing dkb_robo.py should be enough)

from dkb-robo.

hogliux avatar hogliux commented on June 11, 2024

Yes it works now. Thank you!

from dkb-robo.

grindsa avatar grindsa commented on June 11, 2024

Fixed with 0.23.2

from dkb-robo.

hogliux avatar hogliux commented on June 11, 2024

Thank you!

from dkb-robo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.