--> -->
<type 'exceptions.IOError'> | Python 2.7.2: /home3/zenmagic/python/bin/python Tue Oct 15 18:19:03 2024 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/home2/zenmagic/public_html/docomparas.py in |
23 |
24 opener = urllib.FancyURLopener({}) |
=> 25 f1 = opener.open('fed-may.txt') |
26 s1=f1.read() |
27 s1=re.sub(sd,"",s1) |
f1 undefined, opener = <urllib.FancyURLopener instance>, opener.open = <bound method FancyURLopener.open of <urllib.FancyURLopener instance>> |
/home3/zenmagic/python/lib/python2.7/urllib.py in open(self=<urllib.FancyURLopener instance>, fullurl='fed-may.txt', data=None) |
203 try: |
204 if data is None: |
=> 205 return getattr(self, name)(url) |
206 else: |
207 return getattr(self, name)(url, data) |
builtin getattr = <built-in function getattr>, self = <urllib.FancyURLopener instance>, name = 'open_file', url = 'fed-may.txt' |
/home3/zenmagic/python/lib/python2.7/urllib.py in open_file(self=<urllib.FancyURLopener instance>, url='fed-may.txt') |
459 return self.open_ftp(url) |
460 else: |
=> 461 return self.open_local_file(url) |
462 |
463 def open_local_file(self, url): |
self = <urllib.FancyURLopener instance>, self.open_local_file = <bound method FancyURLopener.open_local_file of <urllib.FancyURLopener instance>>, url = 'fed-may.txt' |
/home3/zenmagic/python/lib/python2.7/urllib.py in open_local_file(self=<urllib.FancyURLopener instance>, url='fed-may.txt') |
473 stats = os.stat(localname) |
474 except OSError, e: |
=> 475 raise IOError(e.errno, e.strerror, e.filename) |
476 size = stats.st_size |
477 modified = email.utils.formatdate(stats.st_mtime, usegmt=True) |
builtin IOError = <type 'exceptions.IOError'>, e = OSError(2, 'No such file or directory'), e.errno = 2, e.strerror = 'No such file or directory', e.filename = 'fed-may.txt' |
<type 'exceptions.IOError'>: [Errno 2] No such file or directory: 'fed-may.txt'
args =
(2, 'No such file or directory')
errno =
2
filename =
'fed-may.txt'
message =
''
strerror =
'No such file or directory'