This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Bug in cookiejar
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.1
Status: closed Resolution: duplicate
Dependencies: Superseder: cookielib chokes on non-integer cookie version, should ignore it instead
View: 3924
Assigned To: Nosy List: Claudiu.Popa, eric.araujo, jjlee
Priority: normal Keywords:

Created on 2010-06-11 17:34 by Claudiu.Popa, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg107564 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2010-06-11 17:34
Hello. This is my first report, sorry if I won't do it right.
I found a bug in cookielib, which looks like this(a traceback):

"""C:\Python31\lib\http\ UserWarning: http.cookiejar bug!
Traceback (most recent call last):
  File "C:\Python31\lib\http\", line 1584, in make_cookies
    parse_ns_headers(ns_hdrs), request)
  File "C:\Python31\lib\http\", line 1541, in _cookies_from_attrs_se
    cookie = self._cookie_from_cookie_tuple(tup, request)
  File "C:\Python31\lib\http\", line 1460, in _cookie_from_cookie_tu
    version = int(version)
ValueError: invalid literal for int() with base 10: '1.0'

msg107565 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-06-11 17:37
Thanks for your report. Can you copy the code provoking the bug?
msg107566 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2010-06-11 17:45
"""                CHttp.__init__(self,1,proxy = shared.setts.currentGoogleProxy)
                self.timeout = shared.setts.cGglHttpTimeout

                self.proxy = globShare.currentGoogleProxy[globShare.currentGoogleIndex]
                if self.proxy:
                        proxy_support = urllib.request.ProxyHandler({'http':self.proxy,'https':self.proxy,'ftp':self.proxy})
                        proxy_support = urllib.request.ProxyHandler({})

                        #self._cp = urllib.request.HTTPCookieProcessor(http.cookiejar.CookieJar())

                self._cj = http.cookiejar.MozillaCookieJar()
                self._opener1 = urllib.request.build_opener(proxy_support,self._cp)
..... openedUrl ="""

The script was a crawler that searches for pdf's on internet. One thread printed the untreated exception.
msg107568 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-06-11 17:51
Could you provide a minimal usable script? We can’t run your excerpt to
reproduce the bug, and reproducing is the first step to debugging. I
think we’ll also need the site address, or the cookie header, or the
cookies file that provoke the bug.
msg110118 - (view) Author: John J Lee (jjlee) Date: 2010-07-12 18:11
This is a duplicate of issue3924
Date User Action Args
2022-04-11 14:57:02adminsetgithub: 53221
2010-07-12 20:31:34eric.araujosetstatus: open -> closed
type: crash -> behavior
superseder: cookielib chokes on non-integer cookie version, should ignore it instead
resolution: duplicate
stage: resolved
2010-07-12 18:11:49jjleesetnosy: + jjlee
messages: + msg110118
2010-06-11 17:51:46eric.araujosetmessages: + msg107568
2010-06-11 17:45:37Claudiu.Popasetmessages: + msg107566
2010-06-11 17:37:56eric.araujosetnosy: + eric.araujo
messages: + msg107565
2010-06-11 17:34:48Claudiu.Popacreate