dime = self.sPyCNokiaCVImage1.Size()
width ,height = dime

aResult = 0
self.PyCPixelAccess = PyNcvLib.PyCPixelAccess()

aResult = self.PyCPixelAccess.Image_NewLC(self.sNokiaCVImage1)
for aY in range(1,height):
for aX in range(1,width):
aResult = self.PyCPixelAccess.GetRGB(aX,aY)
aR , aG , aB = aResult
self.PyCPixelColorModel = PyNcvLib.PyCPixelColorModel(aR, aG, aB)
aresult = self.PyCPixelColorModel.Gray()
self.tNokiaCVImage1,[aX,aY] = aresult

self.sNokiaCVImage2 =self.tNokiaCVImage1
self.PyCImageOperations.EdgeDetect(self.sNokiaCVImage2, self.tNokiaCVImage2, 4)
filename=u'e:\\images\\edgenew.jpg'
self.target_image2.save(filename)
self.display_image = self.target_image2
self.fullupdate()
lock.wait()

sPyCNokiaCVImage1 takes RGB color image.This code coverts RGB to gray, then finds the edge detection of gray scale image. Once the gray value for particular RGB is found, m facing problem in putting that value in another image object so that I can use that to find edge detection.
Type error:unpack non sequence. It is showing this error in this line of code:
self.tNokiaCVImage1,[aX,aY] = aresult

What should I do ?