field.name
is a method, you need to call it with (): field.name()
is the field name.
Same as:
somelist = ['a','b']
[letter.upper for letter in somelist]
[<built-in method upper of str object at 0x000002CDB16DCDF8>, <built-in method upper of str object at 0x000002CDB16DC768>]
[letter.upper() for letter in somelist]
['A', 'B']
So your fieldnamelist is a list of methods, not fieldnames. Try:
if field.name() != fieldname:
fieldNameList.append(field.name())