akloeckner / hacs-hafas

Port of kilimnik's HAFAS client for HACS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"unknown" error during config flow

akloeckner opened this issue · comments

When evaluating the station name (presumably), an unspecific error occurs, resulting in "unknown" to be displayed to the user. I guess, that originates somewhere here:

errors["base"] = "unknown"

@enjoysimpson, I thought we'd better split this issue from the general setup issue #1.

I debugged this a bit and came to the conclusion, it's the library pyhafas's fault. When requesting stations the response it gets from the db hafas apii s{'ver': '1.16', 'ext': 'DB.R19.04.a', 'lang': 'deu', 'id': '', 'err': 'CLIENTVERSION', 'cInfo': {'code': 'VD'}, 'svcResL': []}.

So, it seems, that the hafas api is updates somehow.

Unfortunately the pyhafas library does not look maintained anymore. I will look into this some more.

🙄 Let's hope, we don't need to fork pyhafas and learn how to publish it to pypi...

@akloeckner thanks for moving my topic to here.
@kilimnik thanks for looking into this. I like the idea of connecting to the HAFAS interface way more, than the web scraping done by the DB integration. I'm not able to help you with editing the source code. But I would be happy to test if needed.
I cross the fingers you will find a solution.

I just checked the commit mentioned above and it seems to have fixed the issue.