[ python-Bugs-1378455 ] a problem of urllib using open_local_file

SourceForge.net noreply at sourceforge.net
Thu Dec 15 23:00:34 CET 2005


Bugs item #1378455, was opened at 2005-12-12 03:10
Message generated for change (Comment added) made by birkenfeld
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1378455&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Windows
Group: Python 2.4
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Weongyo Jeong (weongyo)
Assigned to: Nobody/Anonymous (nobody)
Summary: a problem of urllib using open_local_file

Initial Comment:
Hello. I'm sorry for my short english.

I'm using python 2.4 on my windows system.  But I have
a problem.  see below:

-------------------->3----------------->3-------
Traceback (most recent call last):
  File "main.py", line 57, in uploadproc
    UNNAMED_toplev.main (self.liststore.get_value
(iter, i))
  File "C:\Work\unnamed\UNNAMED_toplev.py", line 59, in
main
    toplev_main (doc, TARGET_FILE)
  File "C:\Work\unnamed\UNNAMED_toplev.py", line 51, in
toplev_main
    doc.documentElement.appendChild
(UNNAMED_filehash.GetSHA1Info (doc, filepath
))
  File "C:\Work\unnamed\UNNAMED_filehash.py", line 19,
in GetSHA1Info
    file = urllib.urlopen (filepath)
  File "C:\Python24\lib\urllib.py", line 77, in urlopen
    return opener.open(url)
  File "C:\Python24\lib\urllib.py", line 185, in open
    return getattr(self, name)(url)
  File "C:\Python24\lib\urllib.py", line 421, in open_file
    return self.open_local_file(url)
  File "C:\Python24\lib\urllib.py", line 435, in
open_local_file
    raise IOError(e.errno, e.strerror, e.filename)
IOError: [Errno 2] No such file or directory:
'\C:\pse_signature.psr'
-------------------->3----------------->3-------

i made a simple GUI program with pygtk and do drag and
drop a file from windows file explorer. It printed
"file:///C:/pse_signature.psr" which is a type of
"text/uri-list".  But urllib can't process it.

Is it a problem of urllib?  I read a article which
reported a same problem with my case in python 2.2.

that "file:///C:/pse_signature.psr" string made by
windows. not me.

why this problem don't be fixed? are there any reasons?

thanks for reading.


----------------------------------------------------------------------

>Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-12-15 23:00

Message:
Logged In: YES 
user_id=1188172

I should add that the problem was not in urllib itself, but
nturl2path.

----------------------------------------------------------------------

Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-12-15 22:59

Message:
Logged In: YES 
user_id=1188172

Fixed in r41705,41706. Thanks for the report!

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1378455&group_id=5470


More information about the Python-bugs-list mailing list