In your pixel funtion you named a variable pixel which is same as the funtion name which is causing the issue, Change the name and it should solve your issue