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

Vizio's get_apps_list is throwing AttributeError #167

Open
rusdog2784 opened this issue Jan 10, 2025 · 0 comments
Open

Vizio's get_apps_list is throwing AttributeError #167

rusdog2784 opened this issue Jan 10, 2025 · 0 comments

Comments

@rusdog2784
Copy link

For an unknown reason (didn't have time to dig deeper), when I run get_apps_list() using the Vizio class, it throws the following error:

Traceback (most recent call last):
  File "/xxx/vizio_test.py", line 33, in <module>
    apps = tv.get_apps_list()
           ^^^^^^^^^^^^^^^^^^
  File "/xxx/venv/lib/python3.11/site-packages/pyvizio/helpers.py", line 13, in wrapper
    return asyncio.run(f(*args, **kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/yyy/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/yyy/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/yyy/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/xxx/venv/lib/python3.11/site-packages/pyvizio/__init__.py", line 1195, in get_apps_list
    return await super(Vizio, Vizio).get_apps_list(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/xxx/venv/lib/python3.11/site-packages/pyvizio/__init__.py", line 728, in get_apps_list
    if country.lower() != "all":
       ^^^^^^^^^^^^^
AttributeError: 'Vizio' object has no attribute 'lower'

I found a simple fix, if you are interested in implementing it. In file and method pyvizio > __init__.py > Vizio > get_apps_list add the following to line 1195:

if isinstance(country, Vizio): country = "all"
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

1 participant