core: Unable to add solaredge integration due to `requests.get() takes 1 positional argument but 2 were given`

The problem

Adding the solaredge integration fails. Logs indicate too many arguments are being passed to requests.get() inside of the solaredge API library.

File "/usr/local/lib/python3.10/site-packages/solaredge/solaredge.py", line 81, in get_details
r = requests.get(url, params)
TypeError: get() takes 1 positional argument but 2 were given

Steps to reproduce:

  1. Fill out site ID and API key in order (Leaving default name field as SolarEdge add integration prompt
  2. Click SUBMIT

Observed: unknown error

What version of Home Assistant Core has the issue?

Home Assistant 2022.7.6 Frontend 20220707.1 - latest

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

solaredge

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2022-07-25 13:46:47 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, 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 236, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 177, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
result = await method(view, request, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 109, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 277, in async_configure
result = await self._async_handle_step(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 359, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/usr/src/homeassistant/homeassistant/components/solaredge/config_flow.py", line 69, in async_step_user
can_connect = await self.hass.async_add_executor_job(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/solaredge/config_flow.py", line 45, in _check_site
response = api.get_details(site_id)
File "/usr/local/lib/python3.10/site-packages/solaredge/solaredge.py", line 81, in get_details
r = requests.get(url, params)
TypeError: get() takes 1 positional argument but 2 were given

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15

Most upvoted comments

I have the same problem.

@frenck maybe this helps towards the solution: My problem seems to occur due to the Toshiba AC integration. When I remove it SolarEdge starts working again.

Link to post