home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.14k stars 29.82k forks source link

Integration setup fails #123492

Open testercell opened 1 month ago

testercell commented 1 month ago

The problem

When setting up the integration I am getting an error after typing in the address. On docker I get a 200 ok message despite the integration failing.

I do have webui running in this docker instance, could this be the cause of it as there isn't a way for HA to then login to Webui?

Logs attached

What version of Home Assistant Core has the issue?

2024.8

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Ollama

Link to integration documentation on our website

https://www.home-assistant.io/integrations/ollama/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/ollama/config_flow.py", line 92, in async_step_user
    response = await self.client.list()
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/ollama/_client.py", line 894, in list
    return response.json()
           ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_models.py", line 764, in json
    return jsonlib.loads(self.content, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Additional information

No response

home-assistant[bot] commented 1 month ago

Hey there @synesthesiam, mind taking a look at this issue as it has been labeled with an integration (ollama) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `ollama` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign ollama` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


ollama documentation ollama source (message by IssueLinks)

dontpanic-13 commented 1 month ago

@testercell Have you tried using the port of ollama instead of the port for the web-ui? (ie. Port 11434 instead of 3000)? I received the same error when I tried setting up the integration with the web-ui port

dead-pixelz commented 1 day ago

I'm having the same/similar issue. I'm unable to configure Ollama integration due to "Unable to connect" error with URL http://192.168.1.100:11434

Logger: homeassistant.components.ollama.config_flow Source: components/ollama/config_flow.py:99 integration: Ollama (documentation, issues) First occurred: 13:19:52 (3 occurrences) Last logged: 21:51:47

Unexpected exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/ollama/config_flow.py", line 99, in async_step_user response = await self.client.list() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/ollama/_client.py", line 894, in list return response.json() ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/httpx/_models.py", line 764, in json return jsonlib.loads(self.content, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/init.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Home Assistant

Core 2024.9.1
Supervisor 2024.08.0
Operating System 13.1
Frontend 20240906.0