Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 cannot recognize url like: https://sinojellycn:123456@storage.msn.com #52234

Closed
JellyChen mannequin opened this issue Feb 22, 2010 · 2 comments
Closed

Python 3 cannot recognize url like: https://sinojellycn:123456@storage.msn.com #52234

JellyChen mannequin opened this issue Feb 22, 2010 · 2 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@JellyChen
Copy link
Mannequin

JellyChen mannequin commented Feb 22, 2010

BPO 7986
Nosy @florentx
Superseder
  • bpo-7291: urllib2 cannot handle https with proxy requiring auth
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2010-02-22.16:13:43.978>
    created_at = <Date 2010-02-22.15:58:10.788>
    labels = ['type-bug', 'library']
    title = 'Python 3 cannot recognize url like: https://sinojellycn:123456@storage.msn.com'
    updated_at = <Date 2010-02-22.16:13:43.977>
    user = 'https://bugs.python.org/JellyChen'

    bugs.python.org fields:

    activity = <Date 2010-02-22.16:13:43.977>
    actor = 'flox'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-02-22.16:13:43.978>
    closer = 'flox'
    components = ['Library (Lib)']
    creation = <Date 2010-02-22.15:58:10.788>
    creator = 'Jelly.Chen'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 7986
    keywords = []
    message_count = 2.0
    messages = ['99760', '99770']
    nosy_count = 2.0
    nosy_names = ['flox', 'Jelly.Chen']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '7291'
    type = 'behavior'
    url = 'https://bugs.python.org/issue7986'
    versions = ['Python 3.1']

    @JellyChen
    Copy link
    Mannequin Author

    JellyChen mannequin commented Feb 22, 2010

    posturl='https://sinojellycn:123456@storage.msn.com/storageservice/MetaWeblog.rpc'
    username="sinojellycn"
    password="123456"
    
    blog = pyblog.WordPress(posturl, username, password)
    content = {"description":'Test description6', "title":'Test article6'}
    blog.new_post(content, blogid = "1") 
    >>> 
    Traceback (most recent call last):
      File "C:\Python31\Lib\http\client.py", line 664, in _set_hostport
        port = int(host[i+1:])
    ValueError: invalid literal for int() with base 10: '123456@storage.msn.com'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<string>", line 248, in run_nodebug
      File "D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\BlogPost.py", line 384, in <module>
        blog = pyblog.WordPress(posturl, username, password)
      File "D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\pyblog.py", line 266, in __init__
        MetaWeblog.__init__(self, serverapi, username, password, encoding)
      File "D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\pyblog.py", line 167, in __init__
        Blog.__init__(self, serverapi, username, password, encoding, appkey)
      File "D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\pyblog.py", line 57, in __init__
        if not checkURL(serverapi):
      File "D:\Users\Documents\My Knowledge\Plugins\{A0D025CD-970A-4C62-97E4-5CF6F2C9DD6A}\pyblog.py", line 19, in checkURL
        try: urllib.request.urlopen(url)
      File "C:\Python31\Lib\urllib\request.py", line 119, in urlopen
        return _opener.open(url, data, timeout)
      File "C:\Python31\Lib\urllib\request.py", line 347, in open
        response = self._open(req, data)
      File "C:\Python31\Lib\urllib\request.py", line 365, in _open
        '_open', req)
      File "C:\Python31\Lib\urllib\request.py", line 325, in _call_chain
        result = func(*args)
      File "C:\Python31\Lib\urllib\request.py", line 1080, in https_open
        return self.do_open(http.client.HTTPSConnection, req)
      File "C:\Python31\Lib\urllib\request.py", line 1034, in do_open
        h = http_class(host, timeout=req.timeout) # will parse host:port
      File "C:\Python31\Lib\http\client.py", line 1027, in __init__
        HTTPConnection.__init__(self, host, port, strict, timeout)
      File "C:\Python31\Lib\http\client.py", line 650, in __init__
        self._set_hostport(host, port)
      File "C:\Python31\Lib\http\client.py", line 666, in _set_hostport
        raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
    http.client.InvalidURL: nonnumeric port: '123456@storage.msn.com'
    >>>

    @JellyChen JellyChen mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Feb 22, 2010
    @florentx
    Copy link
    Mannequin

    florentx mannequin commented Feb 22, 2010

    It is a duplicate of bpo-7291: it should be fixed in next release 3.1.2.

    @florentx florentx mannequin closed this as completed Feb 22, 2010
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants