I'm working on someone else's code, and it's throwing an error that 'InputStreamError' is not defined. I'm new to python and am not sure how to tell where InputStreamError is defined and how to reference it from the code.
This is what I've got at the moment:
from hachoir_core.error import HachoirError
from hachoir_core.cmd_line import unicodeFilename
from hachoir_parser import createParser
from hachoir_core.tools import makePrintable
from metadata import extractMetadata
from hachoir_core.i18n import getTerminalCharset
from sys import argv, stderr, exit
def getMetadata(inputFilename):
filename, realname = unicodeFilename(inputFilename), inputFilename
try:
parser = createParser(filename, realname)
except InputStreamError:
print "File cannot be found."
return
...
anyone have any ideas on how I could sort this out?