473,883 Members | 1,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

urllib en https

I have a strange problem. I wrote a script that uses urllib.urlopen to fetch
a page through https. In Python 2.2.2 this works without a problem. But
when I use the script in Python I get:

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.4/urllib.py", line 79, in urlopen
return opener.open(url , data)
File "/usr/local/lib/python2.4/urllib.py", line 177, in open
return self.open_unkno wn(fullurl, data)
File "/usr/local/lib/python2.4/urllib.py", line 189, in open_unknown
raise IOError, ('url error', 'unknown url type', type)
IOError: [Errno url error] unknown url type: 'https'

What is happening here? And how can I solve this?

Sep 13 '06 #1
0 1360

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3090
by: john | last post by:
The python libraries like urllib and httplib do not support ssl through a proxy. Urllib2 supports http through a proxy or https alone, but not https through a proxy. A while ago my wife complained to me that perl had trouble w/https. I was surprised since perl has a lot of networking libraries. Preferring python, I took a look a python and found the same problem. Eventually I figured out what python was missing: tunnelling. Though she...
4
5197
by: Gary Feldman | last post by:
I think I've found a deficiency in the design of urllib related to https. In order to complete an https connection, it appears that URLOpener and hence FancyURLOpener require the key and cert files. Or at least, it's not clear from the description of socket.ssl what it does if they're omitted. However, urlopen has no way to specify such things. Nor should it - for typical uses, a person simply trying to retrieve data from an ssl site...
3
2048
by: Volker M. | last post by:
Hey, I want to open a list of URLs with Pythons urllib and the fuction open(URL) automatically. It is important that the program open ONLY normal http-sites and no https-sites with user/password-request. So exists a possibility that I could cancel all site requests with user/password-dialogues? Thx
1
2505
by: John Hunter | last post by:
I have a test script below which I use to fetch urls into strings, either over https or http. When over https, I use m2crypto.urllib and when over http I use the standard urllib. Whenever, I import sockets and setdefaulttimeout, however, using m2crypto.urllib tends to cause a http.BadStatusLine to be raised, even if the timeout is set to be very large. All of the documents in the test script can be accessed publicly. Any ideas? Is...
0
2457
by: Ali.Sabil | last post by:
hello all, I just maybe hit a bug in both urllib and urllib2, actually urllib doesn't support proxy authentication, and if you setup the http_proxy env var to http_proxy=http://user:passwd@host:port/ and https_proxy=$http_proxy i get a traceback : Traceback (most recent call last): File "test_urllib.py", line 2, in ? urllib.urlopen("https://sf.net/")
5
400
by: Cecil Westerhof | last post by:
Something went wrong with my last post. So, again: I have a strange problem. I wrote a script that uses urllib.urlopen to fetch a page through https. In Python 2.2.2 this works without a problem. But when I use the script in Python 2.4.1 (which is more recent) I get: Traceback (most recent call last):   File "<stdin>", line 1, in ?   File "/usr/local/lib/python2.4/urllib.py", line 79, in urlopen...
1
6568
by: brad | last post by:
Has anyone sent an xml payload via post using urllib? I'd like to do something like this: logon_request = """<LoginRequest> <password>"the_password"</password> <user>"the_user"</user> </LoginRequest>""" logon = urllib.urlopen("https://127.0.0.1/api/version/xml", logon_request) print logon.read()
0
1355
by: gmguyx | last post by:
I tried using urllib.urlopen to open a personalized webpage (my.yahoo.com) but it doesn't work: print urllib.urlopen(http://my.yahoo.com).read() Instead of returning my.yahoo.com, it returns a page asking me to log in. So then I tried urllib.urlencode:
3
6511
by: Fredrik Lundh | last post by:
Ghirai wrote: you can get some info via (undocumented?) attributes on the file handle: <httplib.SSLFile instance at 0x00CE2508> '/C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte SGC CA' '/C=US/ST=California/L=Mountain View/O=Google Inc/CN=mail.google.com'
0
9942
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9792
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11144
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10747
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7973
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7133
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5801
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5994
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.