'AttributeError: expected a callback function (and optionally one or two strings) as argument(s)

I'm new to Python and was trying to do some import and export scripting in Blender 2.43(which uses Python 2.4). I had a simple script:

import Blender
import flt_import 
import export_obj
import os


select_file=flt_import.select_file(r'C:\Code\Code\Testing4Flt\sg_navysoldier.flt')
Blender.Window.FileSelector(select_file, "Import OpenFlight", "*.flt")
out_file=export_obj.write_ui(r'C:\Code\Code\Testing4Flt\sg_navysoldier.obj')
Blender.Window.FileSelector(out_file,'Export Wavefront OBJ', sys.makename(ext='.obj'))

When run, I got the error in the title at line 8. I don't really understand what it means and I tried searching it but couldn't find that error exactly. Will appreciate any help.

Edit:

Here's the full traceback.

Traceback (most recent call last):


File "Testing4.py", line 8, in ?
AttributeError:
expected a callback function (and optionally one or two strings) as argument(s)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source