473,395 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

a name error

Hello,

I run this small script:

import urllib2,sys
try:
r=urllib2.urlopen("http://un-know-n.com/")
except URLError,e:
print str(e)
sys.exit(1)

print r.info()
But got the errors:

Traceback (most recent call last):
File "t1.py", line 4, in ?
except URLError,e:
NameError: name 'URLError' is not defined
Why these is not the name of URLError? I saw it on this module's page:

http://www.python.org/doc/lib/module-urllib2.html

Thanks.

Jun 27 '08 #1
0 905

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

Similar topics

1
by: hawk | last post by:
I am creating a series of custom reports, whose parameters are specified through combo boxes in a form, which then generates a custom report based on a series of calculation queries. My problem is...
1
by: Yuki | last post by:
Thanks for taking the time to look at my problem. I keep getting a #Name error from a calculated field on a form. It is a text box field unbound. The calculation is very very simple yet I still...
3
by: Regnab | last post by:
I'm not sure if this is some random bug in the system, but I keep getting the #Name? error on one of my forms when I try to link one field to another. For example, I have one field called...
3
by: beat1078 | last post by:
I have a report that I create using unbound text boxes to link to an open form. When you click on a cmdbutton on the form the report is supposed to print out information from the form. It works...
5
by: bitsnbytes64 | last post by:
Hi, I have a test form with: * textbox txtIXO_NR bound to column IXO_NR through the linked SQL Server 2005 table TXOCTC (link name "dbo_TXOCTC") * an unbound textbox which should display the...
8
by: teneesh | last post by:
I am trying to get rid of the #Name error that appears in my txtHosp text box when I run this code. the code below is also a call command, so any time I am updating a combo box, the following error...
1
by: Paulson | last post by:
Hi all I got a problem in my PHP code while uploading huge files The error is as follows __________________________________________________________________ $_FILE -...
4
by: jkriner | last post by:
#Name? error message in Access Form -------------------------------------------------------------------------------- Hello I have created a simple database with 4 tables (all the same fields in...
3
by: shayvillere | last post by:
I'm designing a report and cannot pull data from a query. The control gives me a #Name? error when I do a print preview. I never had this problem with Access 2000. Any ideas?
6
by: codicecrm | last post by:
am trying to create a main report containing several subreports in Access 2003, all based on individual queries. The data for each subreport actually displays just fine, but I am having problems...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.