I receive this error when executing the following script. I highlighted the section that’s causing the issue. col4.replace("’", “’’”)
Traceback (most recent call last):
File “
event:actionPerformed
”, line 25, in
AttributeError: ‘NoneType’ object has no attribute ‘replace’
Hello,
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.
Best,