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.

classification
Title: webbrowser : Could not open ftp server using webbrowser.open()
Type: Stage:
Components: Versions: Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, hmo, orsenthil, pitrou
Priority: normal Keywords:

Created on 2009-09-30 14:48 by hmo, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (7)
msg93368 - (view) Author: Harshad Modi (hmo) Date: 2009-09-30 14:48
Hi,

I try to open ftp site using webbrowser.open('ftp://localhost:21') in
python2.6.

but It can not open and give error like :
Error showing url: The specified location is not mounted

It is working good in python2.5

so can anybod help me ? what am I wrong ?

Thanks in Adcance.
msg93369 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2009-09-30 15:19
It is very difficult to debug with the information you have provided.
The webbrowser.py has indeed undergone some changes, but they are
positive changes and should not break any working behaviour.

For your problem, you might want to mention.
1) Your OS.
2) Your Default Browser ( as set by the OS)
3) Also, do the webbrowser.open() on a generic site like
"ftp://ftp.aduni.org" in your python2.6 installation to see if that
works.

It works for me in python2.6 + firefox 3.x + Ubuntu.
msg93390 - (view) Author: Harshad Modi (hmo) Date: 2009-10-01 05:26
[Senthil Kumaran]
Thanks to Reply.
1) OS : Ubuntu 9.04 - the Jaunty Jackalope - released in April 2009.
2) Default Browser : Firefox 3.0.8
3) Tested with "ftp://ftp.aduni.org" but still error.
4) Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18) [GCC 4.3.3] on
linux2

Sorry It is not work for me in python2.6.2 + Ubuntu 9.04 + Firefox 3.0.8

Thanks
msg93433 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-10-02 10:12
No problem here, with Firefox 3.0.13 and Python 2.6.3.
msg93434 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-10-02 10:14
If you are under GNOME, you might fire gconf-editor and check the value
of the keys in /desktop/gnome/url-handlers/ftp.
msg93578 - (view) Author: Harshad Modi (hmo) Date: 2009-10-05 07:23
Hi, Antoine Pitrou!

It is missing key for ftp in url-handlers...
how can I add key for ftp?

Thanks
msg93586 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2009-10-05 09:48
This bug is bit a tricky case.

Harshad: You might try the "work-around" suggested by Antoine. But that
is just a work-around. not a fix. Add an entry to gconf-editor like any
other. ( google).

The actual bug seems to be with gnome-open which is unable to handle ftp
urls.

$ gnome-open http://www.google.com
02:44 PM:senthil@:~/python/trunk/Lib
$ gnome-open ftp://ftp.freebsd.org
Error showing url: The specified location is not mounted

Google for (gnome-open + bug + ftp) you will be given the list of bugs.

In my case, I think the user-installed firefox has taken the control of
the ftp mimetype and in your case, gnome-open is the default and it is
failing with ftp.

As per suggestion just work-around it with ftp handlers and it should
do. May check with ubuntuforums for suggestions too.

There is a no problem with the webbrowser.py and I am closing this bug
as Invalid.
History
Date User Action Args
2022-04-11 14:56:53adminsetgithub: 51273
2009-10-05 09:48:17orsenthilsetstatus: open -> closed
resolution: not a bug
messages: + msg93586
2009-10-05 07:23:00hmosetmessages: + msg93578
2009-10-02 10:14:31pitrousetmessages: + msg93434
2009-10-02 10:12:17pitrousetassignee: georg.brandl

messages: + msg93433
nosy: + georg.brandl, pitrou
2009-10-01 05:26:25hmosetmessages: + msg93390
2009-09-30 15:19:09orsenthilsetnosy: + orsenthil
messages: + msg93369
2009-09-30 14:48:37hmocreate