#5 Calling non existing function
Closed: Fixed None Opened 8 years ago by kushal.

https://pagure.io/libpagure/blob/master/f/libpagure/libpagure.py#_69

We have to remove this call to make Pagure object work.


Pasting the error below:

p.list_issues()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/libpagure/libpagure.py", line 344, in list_issues
return_value = self.__call_api(request_url, params=payload)
File "/usr/lib/python2.7/site-packages/libpagure/libpagure.py", line 69, in __call_api
req._save_cookies()
AttributeError: 'Response' object has no attribute '_save_cookies'

Could it be self.session._save_cookies() instead?

Hi @pingou i tried using your suggestion of self.session._save_cookies() but didn't work, then i looked into requests codebase but couldn't find any trace of function called _save_cookies(). Also its not clear what it is trying to do. I removed that particular line and things worked for me. Maybe that's an incomplete function which saves cookies to some storage(unsure). Please guide on how should i fix this bug.

Hi @pingou i tried using your suggestion of self.session._save_cookies() but didn't work, then i looked into requests codebase but couldn't find any trace of function called _save_cookies(). Also its not clear what it is trying to do. I removed that particular line and things worked for me. Maybe that's an incomplete function which saves cookies to some storage(unsure). Please guide on how should i fix this bug.

Yeah, It might be a incomplete function planned with the purpose to store cookies as files. Maybe we can remove it as I cannot see any utility. Also requests reuses the same cookie for future requests too.

/cc @yangl1996

Hi,

Yeah, I think we can just remove the line. No need to explicitly save cookie.

Thanks you :)

Log in to comment on this ticket.

Metadata