Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception because schoolyear is null #134

Closed
mtdcr opened this issue Aug 17, 2024 · 0 comments
Closed

Exception because schoolyear is null #134

mtdcr opened this issue Aug 17, 2024 · 0 comments

Comments

@mtdcr
Copy link

mtdcr commented Aug 17, 2024

The problem

While trying to add the account for next school year during the summer holidays, an exception occurred. Using the account in Untis Mobile was already possible (without any data in it).

Version of Home Assistant?

2024.8.1

What type of installation are you running?

Home Assistant Container

Version of WebUntis

v1.1.4

Last working WebUntis version

No response

Traceback/Error logs

2024-08-17 13:35:02.716 ERROR (SyncWorker_34) [webuntis] {'jsonrpc': '2.0', 'id': '2024-08-17 13:35:02.648815', 'error': {'message': 'Cannot invoke "com.grupet.web.basic.Schoolyear.getEndDate()" because "schoolyear" is null', 'code': -8998}}
2024-08-17 13:35:02.717 ERROR (MainThread) [custom_components.webuntis.config_flow] Unexpected exception
Traceback (most recent call last):
  File "/.local/lib/python3.12/site-packages/webuntis/utils/remote.py", line 123, in _parse_result
    return result_body[u'result']
           ~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'result'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/webuntis/config_flow.py", line 165, in async_step_user
    info = await validate_input(self.hass, user_input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/webuntis/config_flow.py", line 93, in validate_input
    klassen = await hass.async_add_executor_job(session.klassen)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.local/lib/python3.12/site-packages/webuntis/utils/misc.py", line 156, in inner
    data = self._request(jsonrpc_method, jsonrpc_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.local/lib/python3.12/site-packages/webuntis/session.py", line 118, in _request
    data = rpc_request(self.config, method, params or {})
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.local/lib/python3.12/site-packages/webuntis/utils/remote.py", line 91, in rpc_request
    return _parse_result(request_body, result_body)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.local/lib/python3.12/site-packages/webuntis/utils/remote.py", line 125, in _parse_result
    _parse_error_code(request_body, result_body)
  File "/.local/lib/python3.12/site-packages/webuntis/utils/remote.py", line 143, in _parse_error_code
    raise exc
webuntis.errors.RemoteError: Cannot invoke "com.grupet.web.basic.Schoolyear.getEndDate()" because "schoolyear" is null

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants