This error is likely due to accidentally overwriting one of the PySpark functions with a string. Please check your code for this.