If you check the rows in the vwProductionCounts table in the LabelDesc column you should see one or more NULL values.
So when you query the database table and get the values for LabelDesc (row(3)) you get Python’s version of NULL which is None. And the None value does not have a “replace” method so you get the error you are getting.
You could make the default value for this column in the database an empty string so that you don’t get this error or handle the problem in another way.
I do not have control over the database I am connected to that’s why I am pulling these values and dumping them into our local database using this script. I checked that value and you are correct it is null. Is there a way around this with the script?