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

Error in test script #1

Closed
huggre opened this issue Apr 10, 2021 · 3 comments
Closed

Error in test script #1

huggre opened this issue Apr 10, 2021 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@huggre
Copy link

huggre commented Apr 10, 2021

Hi, get this error when trying your example code, any idea?
Do you have any additional documentation for this library?

C:\PythonApps\home_ass>python wrapper_test.py
Traceback (most recent call last):
  File "C:\PythonApps\home_ass\wrapper_test.py", line 11, in <module>
    client = Client(url, token)
  File "C:\Users\Hugo\AppData\Local\Programs\Python\Python39\lib\site-packages\homeassistant_api\rawclient.py", line 58, in __init__
    self.check_api_config()
  File "C:\Users\Hugo\AppData\Local\Programs\Python\Python39\lib\site-packages\homeassistant_api\rawclient.py", line 80, in check_api_config
    valid = {'valid': True, 'invalid': False}.get(res['result'], None)
TypeError: string indices must be integers
@GrandMoff100
Copy link
Owner

I apologize. I am just getting around to this. Hmm, that is peculiar. Could you verify that you set the environmental variables correctly?

I agree there I do need to add more documentation. I didn't realize other people used this but me. Haha. But I'm happy to help.

I also assume that you correctly configured your Homeassistant to run its API server, correct?
Homeassistant API server docs
API Plugin docs

@GrandMoff100 GrandMoff100 added the documentation Improvements or additions to documentation label May 17, 2021
@GrandMoff100 GrandMoff100 self-assigned this May 17, 2021
@GrandMoff100
Copy link
Owner

Closing this issues because extensive documentation is being released soon and big changes have happened in the repository and we feel that this issue is somewhat resolved or is about be at least

@GrandMoff100
Copy link
Owner

GrandMoff100 commented Feb 28, 2022

MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ ACTION actionlint 4 0 0.05s
✅ CREDENTIALS secretlint yes no 0.86s
✅ GIT git_diff yes no 0.01s
✅ JSON eslint-plugin-jsonc 2 0 0 1.02s
✅ JSON jsonlint 2 0 0.58s
✅ JSON prettier 2 0 0 1.07s
✅ JSON v8r 2 0 2.09s
✅ MARKDOWN markdownlint 6 0 0 0.41s
✅ MARKDOWN markdown-link-check 6 0 1.95s
✅ MARKDOWN markdown-table-formatter 6 0 0 0.3s
✅ SPELL misspell 26 0 0 0.07s
✅ YAML prettier 7 0 0 1.29s
✅ YAML v8r 7 0 6.4s
✅ YAML yamllint 7 0 0.18s

See errors details in artifact MegaLinter reports on CI Job page

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

No branches or pull requests

2 participants