[ELIDED]
File "/usr/lib/python3.10/http/cookiejar.py", line 2120, in save
if cookie.has_nonstandard_attr(HTTPONLY_ATTR):
File "/usr/lib/python3.10/http/cookiejar.py", line 805, in has_nonstandard_attr
return name in self._rest
TypeError: argument of type 'NoneType' is not iterable
because py-macaroon-bakery creates a http.cookiejar.Cookie() object with the rest field set to None, causing the writing out of a cookie file to fail.
Upstream bug report: https:/ /github. com/go- macaroon- bakery/ py-macaroon- bakery/ issues/ 88
See above for details, but the essential bug is that doing something like the following:
client = httpbakery. Client( cookies= MozillaCookieJa r(".cooklefile" ))
if os.path. exists( client. cookies. filename) :
client. cookies. load(ignore_ discard= True)
response = client. request( "POST", url=url, json=payload) cookies. save(ignore_ discard= True)
client.
stated throwing a traceback under python3.10:
[ELIDED] python3. 10/http/ cookiejar. py", line 2120, in save has_nonstandard _attr(HTTPONLY_ ATTR): python3. 10/http/ cookiejar. py", line 805, in has_nonstandard _attr
File "/usr/lib/
if cookie.
File "/usr/lib/
return name in self._rest
TypeError: argument of type 'NoneType' is not iterable
because py-macaroon-bakery creates a http.cookiejar. Cookie( ) object with the rest field set to None, causing the writing out of a cookie file to fail.