473,289 Members | 2,108 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,289 software developers and data experts.

Error handling in Python

Dear Members of the group,
If I open a url by urlopen in the urllib, the file is either opening a
file or if no url is there it would give error. The error is generated
can be handled by IOError handling schemes.
But if there are thousands or millions of URLs and I do not know who
will open and who won't open. How can I handle this kind of situation?
If any one can help solving this problem.
Regards,
Subhabrata.
Jun 27 '08 #1
1 855
su*************@hotmail.com wrote:
Dear Members of the group,
If I open a url by urlopen in the urllib, the file is either opening a
file or if no url is there it would give error. The error is generated
can be handled by IOError handling schemes.
But if there are thousands or millions of URLs and I do not know who
will open and who won't open. How can I handle this kind of situation?
If any one can help solving this problem.
http://docs.python.org/tut/node10.html

Diez
Jun 27 '08 #2

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

Similar topics

9
by: wordsender | last post by:
Hey guys, I can't figure this one out, why is this simple script giving me problems? logfile=file(r'test.txt','w') logfile.write('datetime') test=logfile.readlines() When I run it I get...
0
by: matt.keyes | last post by:
Hey all, i'm trying to create an application that both embeds and extends python through boost. i've got a rough framework up and running, but now that i'm finally to the python part i'm having...
12
by: sam | last post by:
hi all, i'm starting to put together a program to simulate the performance of an investment portfolio in a monte carlo manner doing x thousand iterations and extracting data from the results. ...
3
by: Wolfram | last post by:
I have a problem with displaying errors in an embedded situation. The "main program" I want to embed Python into is a windows, MFC, non-console, C++ application. My issue is that I have not been...
0
by: poojamangal | last post by:
I want to upload images or pdf files. but i m unable to do so. i got error. please help me to sort it out.. my code is: <% 'on error resume next Class FreeASPUpload Public UploadedFiles...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.