AttributeError: 'list' object has no attribute 'Family'

I want to use a script to read a list a Profile family from excel. I found the attribute error. The script is work for a single Profile Family. But for a list of Profile Family, i get a attribute error.

import clr
from Autodesk.DesignScript.Geometry import *

# Import ToDSType(bool) extension method
import Revit

# Import DocumentManager and TransactionManager
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

from System.Collections.Generic import *

# Import RevitAPI
import Autodesk
from Autodesk.Revit.DB import *

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application

type = UnwrapElement(IN[0].Family.Name)
name = UnwrapElement(IN[0].Name)

family = UnwrapElement(IN[0]).Family

famDoc = doc.EditFamily(family)

famCollector = FilteredElementCollector(famDoc)
sketch = famCollector.OfClass(Sketch)

for i in sketch:
	cArray = list(i.Profile)
cArray[:] = [[Revit.GeometryConversion.RevitToProtoCurve.ToProtoType(y, True ) for y in x] for x in cArray]
OUT = cArray

import clr

#Import the Revit API
import Autodesk
from Autodesk.Revit.DB import *

#---###Start scripting here:###---#

type = (i.FamilyName for i in UnwrapElement(IN[0])) #FamilySymbol in the context of the API

OUT = type