I ve developed a py file to trace the location via GPS and perform the followiing actions:
2.Change profile
3.send SMS
depending on the location

All of these scripts are running fine in the script shell

but when i made a sis file using PyS60 application packager with a certificate having all capabilities the script was just not executing the GPS tracing part..i mean GPS was not initialized...
the code is here
def initialize_gps():
	'''This function initializes the GPS. The select_module(module_id) can be used to select the GPS module in this function.
	In this case we are using the default GPS (integrated GPS) hence we do not need to select it.'''
	appuifw.note(u'Intializing GPS')
	global gps_data
		#Intitialize the global dictionary with some initial dummy value (0.0 in this case)
	gps_data = {
	'satellites': {'horizontal_dop': 0.0, 'used_satellites': 0, 'vertical_dop': 0.0, 'time': 0.0,'satellites': 0, 'time_dop':0.0},
	'position': {'latitude': 0.0, 'altitude': 0.0, 'vertical_accuracy': 0.0, 'longitude': 0.0, 'horizontal_accuracy': 0.0},
	'course': {'speed': 0.0, 'heading': 0.0, 'heading_accuracy': 0.0, 'speed_accuracy': 0.0}
		# Set requesters - it is mandatory to set at least one
		# Request for a fix every 0.5 seconds
                positioning.position(course=1,satellites=1,callback=cb_gps, interval=5000000,partial=0)
                        # Sleep for 3 seconds for the intitial fix
                        print "in init GPS"
                        print gps_data['satellites']['used_satellites'], gps_data['position']['latitude'], gps_data['position']['longitude'], gps_data['course']['speed']
		appuifw.note(u'Problem with GPS','error')

this directly enters the except part

urgent help required
thnx in advance