Antoni-Czaplicki / vulcan-for-hassio

Vulcan inegration for home assistamt
26 stars 3 forks source link

Error handling request #11

Closed darkjumpy closed 3 years ago

darkjumpy commented 3 years ago

Hi, I'm trying to add a second account to the integration, but I'm getting this warning and error:

WARNING:

Logger: homeassistant.util.async_
Source: util/async_.py:129
First occurred: 2:00:08 PM (2 occurrences)
Last logged: 2:00:09 PM
Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for vulcan doing I/O at custom_components/vulcan/register.py, line 11: keystore = Keystore.create(device_model="Home Assistant")
Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for vulcan doing I/O at custom_components/vulcan/register.py, line 12: account = await Account.register(keystore, token, symbol, pin)

ERROR:

Logger: aiohttp.server
Source: custom_components/vulcan/register.py:12
First occurred: 2:00:09 PM (1 occurrences)
Last logged: 2:00:09 PM
Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 129, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 150, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 106, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 158, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 216, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/config/custom_components/vulcan/config_flow.py", line 35, in async_step_user
    regdata = await register.register(
  File "/config/custom_components/vulcan/register.py", line 12, in register
    account = await Account.register(keystore, token, symbol, pin)
  File "/usr/local/lib/python3.8/site-packages/vulcan/_account.py", line 52, in register
    response = await api.post(full_url, body)
  File "/usr/local/lib/python3.8/site-packages/vulcan/_api.py", line 146, in post
    return await self._request("POST", url, body, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/vulcan/_api.py", line 130, in _request
    raise RuntimeError(status["Message"])
RuntimeError: Internal Server Error (ArgumentException)
Antoni-Czaplicki commented 3 years ago

Are you adding an account using your saved login credentials?

darkjumpy commented 3 years ago

No, I'm adding completely new one

Antoni-Czaplicki commented 3 years ago

Please try to log in to that account using this: https://pypi.org/project/vulcan-api/2.0.0b1/

darkjumpy commented 3 years ago

After restarting the HA host everything started working. Thanks for your help