Giter Site home page Giter Site logo

Comments (25)

eleibzon avatar eleibzon commented on July 4, 2024 1

its 2 different contracts

from iec-custom-component.

eleibzon avatar eleibzon commented on July 4, 2024 1
2024-03-12 08:54:03.785 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
 File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
   resp = await request_handler(request)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
   resp = await handler(request)
          ^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
   return await handler(request)
          ^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 91, in security_filter_middleware
   return await handler(request)
          ^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 227, in forwarded_middleware
   return await handler(request)
          ^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 25, in request_context_middleware
   return await handler(request)
          ^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware
   return await handler(request)
          ^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
   return await handler(request)
          ^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware
   response = await handler(request)
              ^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 68, in handle
   result = await handler(request, **request.match_info)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 72, in with_admin
   return await func(self, request, *args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 197, in post
   return await super().post(request, flow_id)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
   result = await method(view, request, data, *args, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 111, in post
   result = await self._flow_mgr.async_configure(flow_id, data)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 359, in async_configure
   result = await self._async_configure(flow_id, user_input)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 405, in _async_configure
   result = await self._async_handle_step(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 546, in _async_handle_step
   self._raise_if_step_does_not_exist(flow, result["step_id"])
 File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 569, in _raise_if_step_does_not_exist
   raise UnknownStep(
homeassistant.data_entry_flow.UnknownStep: Handler ConfigEntriesFlowManager doesn't support step select_contracts

from iec-custom-component.

GuyKh avatar GuyKh commented on July 4, 2024 1

Awesome!
Thanks for testing these things out! :)

from iec-custom-component.

ohadbenita avatar ohadbenita commented on July 4, 2024 1

@ohadbenita - can you open a new issue with this log?

Sure, see #67

from iec-custom-component.

eleibzon avatar eleibzon commented on July 4, 2024

Hi Guy,

I have 2 different meters under the same TZ.
Please suggest a solution.

from iec-custom-component.

GuyKh avatar GuyKh commented on July 4, 2024

@eleibzon - I see it's a relevant scenario, and still is not supported.
Can you check if you have 2 meters under the same contract or two contracts with a single meter in each ?

from iec-custom-component.

GuyKh avatar GuyKh commented on July 4, 2024

@eleibzon - added a new pre-release (0.0.20) - can you try to install it?
It should support multiple contracts

from iec-custom-component.

eleibzon avatar eleibzon commented on July 4, 2024

New problem! Can’t add an account at all
IMG_9735

from iec-custom-component.

GuyKh avatar GuyKh commented on July 4, 2024

Can you send me the error from the logs?

from iec-custom-component.

GuyKh avatar GuyKh commented on July 4, 2024

@eleibzon Let's try again with beta 0.0.20b1

from iec-custom-component.

GuyKh avatar GuyKh commented on July 4, 2024

I need to fix something with the translation there I think too

from iec-custom-component.

eleibzon avatar eleibzon commented on July 4, 2024

Untitled

from iec-custom-component.

GuyKh avatar GuyKh commented on July 4, 2024

🀦🏻 Looking into it
Just to be sure - the number on top (="not valid option") is not any of the bottom ones?

from iec-custom-component.

GuyKh avatar GuyKh commented on July 4, 2024

@eleibzon let's try with 0.0.20b2

from iec-custom-component.

eleibzon avatar eleibzon commented on July 4, 2024

Untitled

from iec-custom-component.

GuyKh avatar GuyKh commented on July 4, 2024

God damn. Little mistake. in 5 mins you'll have 0.0.20b3

from iec-custom-component.

eleibzon avatar eleibzon commented on July 4, 2024
2024-03-12 14:56:04.417 ERROR (MainThread) [custom_components.iec.coordinator] Unexpected error fetching Iec data: 'NoneType' object has no attribute 'smart_meter'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 318, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/iec/coordinator.py", line 144, in _async_update_data
    await self._insert_statistics(contract_id, contracts.get(contract_id).smart_meter)
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'smart_meter'
2024-03-12 14:56:11.296 ERROR (MainThread) [custom_components.iec.coordinator] Unexpected error fetching Iec data: 'NoneType' object has no attribute 'smart_meter'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 318, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/iec/coordinator.py", line 144, in _async_update_data
    await self._insert_statistics(contract_id, contracts.get(contract_id).smart_meter)
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'smart_meter'
2024-03-12 14:56:23.233 ERROR (MainThread) [custom_components.iec.coordinator] Unexpected error fetching Iec data: 'NoneType' object has no attribute 'smart_meter'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 318, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/iec/coordinator.py", line 144, in _async_update_data
    await self._insert_statistics(contract_id, contracts.get(contract_id).smart_meter)
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'smart_meter'

from iec-custom-component.

GuyKh avatar GuyKh commented on July 4, 2024

Let's try again with 0.0.20b4

from iec-custom-component.

eleibzon avatar eleibzon commented on July 4, 2024

Works perfectly! Thank you.

from iec-custom-component.

ohadbenita avatar ohadbenita commented on July 4, 2024

Does this relate to cases where I use Cellcom as my provider and get the below error?

2024-03-12 17:43:52.745 ERROR (MainThread) [custom_components.iec.coordinator] Unexpected error fetching Iec data: Field "data" of type GetInvoicesBody in ResponseWithDescriptor has invalid value None

from iec-custom-component.

GuyKh avatar GuyKh commented on July 4, 2024

@ohadbenita I need some extra debug logs for that

from iec-custom-component.

ohadbenita avatar ohadbenita commented on July 4, 2024

@ohadbenita I need some extra debug logs for that

Sure, here you go:

2024-03-12 17:43:52.745 ERROR (MainThread) [custom_components.iec.coordinator] Unexpected error fetching Iec data: Field "data" of type GetInvoicesBody in ResponseWithDescriptor has invalid value None
Traceback (most recent call last):
  File "<string>", line 7, in __mashumaro_from_dict_1d2cb13ddbf239913f0f50f5018a33ba__
  File "<string>", line 19, in __mashumaro_from_dict__
ValueError: Argument for iec_api.models.invoice.GetInvoicesBody.__mashumaro_from_dict__ method should be a dict instance

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 318, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/iec/coordinator.py", line 149, in _async_update_data
    billing_invoices = await self.api.get_billing_invoices(self._bp_number, contract_id)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/iec_api/iec_client.py", line 324, in get_billing_invoices
    return await data.get_billing_invoices(self._session, self._token, bp_number, contract_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/iec_api/data.py", line 181, in get_billing_invoices
    return await _get_response_with_descriptor(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/iec_api/data.py", line 64, in _get_response_with_descriptor
    response_with_descriptor = decoder.decode(response)
                               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 9, in __mashumaro_from_dict_1d2cb13ddbf239913f0f50f5018a33ba__
mashumaro.exceptions.InvalidFieldValue: Field "data" of type GetInvoicesBody in ResponseWithDescriptor has invalid value None

from iec-custom-component.

GuyKh avatar GuyKh commented on July 4, 2024

That's a very strange behavior when a call to GetInvoices returns null.

Can you try to log on to IEC website and take a look at your Invoices there to see what happens?

from iec-custom-component.

GuyKh avatar GuyKh commented on July 4, 2024

Closing - solved in version 0.0.20.

from iec-custom-component.

GuyKh avatar GuyKh commented on July 4, 2024

@ohadbenita - can you open a new issue with this log?

from iec-custom-component.

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.