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

a problem of urllib using open_local_file #42680

Closed
weongyo mannequin opened this issue Dec 12, 2005 · 3 comments
Closed

a problem of urllib using open_local_file #42680

weongyo mannequin opened this issue Dec 12, 2005 · 3 comments

Comments

@weongyo
Copy link
Mannequin

weongyo mannequin commented Dec 12, 2005

BPO 1378455
Nosy @birkenfeld

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 2005-12-15.22:00:33.000>
created_at = <Date 2005-12-12.02:10:23.000>
labels = ['OS-windows']
title = 'a problem of urllib using open_local_file'
updated_at = <Date 2005-12-15.22:00:33.000>
user = 'https://bugs.python.org/weongyo'

bugs.python.org fields:

activity = <Date 2005-12-15.22:00:33.000>
actor = 'georg.brandl'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Windows']
creation = <Date 2005-12-12.02:10:23.000>
creator = 'weongyo'
dependencies = []
files = []
hgrepos = []
issue_num = 1378455
keywords = []
message_count = 3.0
messages = ['27047', '27048', '27049']
nosy_count = 2.0
nosy_names = ['georg.brandl', 'weongyo']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1378455'
versions = ['Python 2.4']

@weongyo
Copy link
Mannequin Author

weongyo mannequin commented Dec 12, 2005

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.

@weongyo weongyo mannequin closed this as completed Dec 12, 2005
@weongyo weongyo mannequin added the OS-windows label Dec 12, 2005
@weongyo weongyo mannequin closed this as completed Dec 12, 2005
@weongyo weongyo mannequin added the OS-windows label Dec 12, 2005
@birkenfeld
Copy link
Member

Logged In: YES
user_id=1188172

Fixed in r41705,41706. Thanks for the report!

@birkenfeld
Copy link
Member

Logged In: YES
user_id=1188172

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

@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
Projects
None yet
Development

No branches or pull requests

1 participant