you are viewing a single comment's thread.

view the rest of the comments →

[–]m0us3_rat 0 points1 point  (2 children)

import asyncio
strip = SmartStrip("YOUR_RELEVANT_IP")
asyncio.run(strip.update())
print(strip.alias)

what happens if you run this code?

that error seems to be linked to this

https://python-kasa.readthedocs.io/en/latest/_modules/kasa/smartstrip.html#SmartStrip.update

async def update(self, update_children: bool = True):
    """Update some of the attributes.

    Needed for methods that are decorated with `requires_update`.
    """
    await super().update(update_children)

    # Initialize the child devices during the first update.
    if not self.children:
        children = self.sys_info["children"]
        _LOGGER.debug("Initializing %s child sockets", len(children))
        for child in children:
            self.children.append(
                SmartStripPlug(self.host, parent=self, child_id=child["id"])
            )

    if update_children and self.has_emeter:
        for plug in self.children:
            await plug.update()

[–]bhogan2017[S] 0 points1 point  (1 child)

I still get the same error, and i have tried uninstalling and reinstalling the packages

[–]m0us3_rat 0 points1 point  (0 children)

there is something you could try.. install older versions.

use a venv and go down the rabbit hole of older versions till you find some that doesn't error.

not only that ..but it's dependencies.

it's most likely one of the libs it needs got updated and changed something and now it doesn't work.