question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: 'AsyncClient' object has no attribute 'cookie_jar'

See original GitHub issue

Describe the bug My configuration stopped working a few days ago. When I now try to reconfigure it it always fails with an unknown error.

To Reproduce Steps to reproduce the behavior:

  1. Go to the integrations page
  2. Click on reconfigure
  3. Use Login Proxy (without 2FA app key)
  4. Unknown error is shown after submitting

Expected behavior The integration should be configured correctly.

System details

  • Home-assistant (version): 2021.6.1
  • Hassio (Yes/No): Yes
  • alexa_media (version from const.py or HA startup): 3.10.5
  • alexapy (version from pip show alexapy or HA startup):
  • Amazon 2FA is enabled (y/n). We will not debug login issues if unanswered: yes

Logs 2021-06-06 10:58:21 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Using existing login 2021-06-06 10:58:21 DEBUG (MainThread) [alexapy.alexalogin] Unable to generate OTP; 2FA app key not configured 2021-06-06 10:58:21 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Refreshed 3 modifiers: [‘autofill’, ‘prepend_relative_urls’, ‘change_host_to_proxy’] 2021-06-06 10:58:21 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Starting proxy for t****s@f********g - amazon.de 2021-06-06 10:58:21 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Found existing proxy_view 2021-06-06 10:58:21 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File “/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py”, line 422, in _handle_request resp = await self._request_handler(request) File “/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py”, line 499, in _handle resp = await handler(request) File “/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py”, line 119, 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 202, in forwarded_middleware return await handler(request) File “/usr/src/homeassistant/homeassistant/components/http/request_context.py”, line 24, in request_context_middleware return await handler(request) File “/usr/src/homeassistant/homeassistant/components/http/ban.py”, line 78, in ban_middleware return await handler(request) File “/usr/src/homeassistant/homeassistant/components/http/auth.py”, line 144, in auth_middleware return await handler(request) File “/usr/src/homeassistant/homeassistant/components/http/view.py”, line 135, in handle result = await result File “/usr/src/homeassistant/homeassistant/components/config/config_entries.py”, line 155, in post return await super().post(request, flow_id) File “/usr/src/homeassistant/homeassistant/components/http/data_validator.py”, line 63, 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 202, in async_configure result = await self._async_handle_step(flow, cur_step[“step_id”], user_input) File “/usr/src/homeassistant/homeassistant/data_entry_flow.py”, line 260, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File “/config/custom_components/alexa_media/config_flow.py”, line 356, in async_step_user return await self.async_step_start_proxy(user_input) File “/config/custom_components/alexa_media/config_flow.py”, line 383, in async_step_start_proxy self.proxy.session.cookie_jar.update_cookies( AttributeError: ‘AsyncClient’ object has no attribute ‘cookie_jar’

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:28

github_iconTop GitHub Comments

2reactions
alandtsecommented, Jun 10, 2021

Remove and readd the integration in HA as the workaround.

You may need to delete the .pickle file too.

1reaction
nniehoffcommented, Jun 8, 2021

Uninstalling from HACS, restarting, removing /config/deps/lib/python3.8/site-packages/alexapy*, reinstalling via HACS, restarting HA again seemed to clear it up for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

type object 'CookieJar' has no attribute 'LWPCookieJar ...
but I keep getting this error (AttributeError: type object 'CookieJar' has no attribute 'LWPCookieJar') at this point of my code
Read more >
http.cookiejar — Cookie handling for HTTP clients — Python ...
Discards all contained cookies that have a true discard attribute (usually because they had either no max-age or expires cookie-attribute, or an explicit ......
Read more >
Client Reference — aiohttp 3.8.3 documentation
By default every session instance has own private cookie jar for automatic cookies processing but user may redefine this behavior by providing own...
Read more >
Cookies and CookieJar - Python - Bytes
AttributeError : 'Morsel' object has no attribute 'domain' I've looked at everything I can find via Google and nothing seems to help.
Read more >
requests.cookies — Requests 2.28.1 documentation
CookieJar ` with requests. requests.utils imports from here, so be careful with ... HTTPResponse object """ if not (hasattr(response, "_original_response") ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found