Every week the file's name chenges. The last part of name came's from a data. Both Features Classes at the script are diferente (name and content).
You are right that was confusing about Features Classes, so I explained it better at line 11
import arcpy
...
... # Local variables:
... arcpy.env.workspace = r'C:\Teste_Auto_CLEIA\Auto_Classi\Dinamica_GDB.gdb'
...
... #List FC # line 6
... FC = arcpy.ListFeatureClasses("S_pol_Din*")
... Feature = FC[0]
... print"Feature: "+str(Feature)
...
... #List AnotherFC # line 11
... FCName = arcpy.ListFeatureClasses("pol*")
... FC_Name = FCName[1]
... print"FC_Name: "+str(FC_Name)
... FCNameCut = FC_Name[19:36] # Isn't original lane
... print"FCNameCut "+FCNameCut
...
... #Calculate field (D2clust200m) #Line 18
... with arcpy.da.UpdateCursor(Feature, ('D2clust200m')) as curs:
... for row in curs:
... row[0] = row[0].replace(FCNameCut, "test")
... curs.updateRow(row)
... print"Bakker try"
...
Feature: S_pol_Din_DepL82270692015146eAnt015130
FC_Name: pol_Din_DepL82270692015178eAnt015146
FCNameCut 2015178eAnt015146
Runtime error
Traceback (most recent call last):
File "<string>", line 21, in <module>
AttributeError: 'NoneType' object has no attribute 'replace'