I currently am using a Python label expression to label parcels. I have 4 fields labeled. About 60% of my polygons label correctly, and the rest display the code in the expression, but still label. There is no difference between the polygons that DO label correctly and those that don't. There are no differences in the joined data either. Does anyone know why the label expression is being displayed in two ways on the same polygon data? I can't figure it out.
As @FelixIP noted in a comment, it is likely the special character & that is causing you trouble. From the ArcMap help:
The ampersand (&) and angle bracket (<) are special characters and are not valid in your text if formatting tags are used. Use the equivalent character codes & and < instead.
You have not included your original label expression, so I can not suggest exact correction, but assuming your using ArcMap and the Python label parser, you would need to add
.replace('&','&') after any text field that may have & in the field's value. ex:
[OwnerField].replace('&','&') + '\n<CLR red=255'>' + ...
Or you could use field calculator on the original data to remove or replace the & in the data itself, but be warned the
& is only replaced with
& automatically by ArcMap in labels when formatting tags (ex:
<FNT ...> or
<BOL>) are used. If no such formatting tags are used, the label would show on the map as
LastName FirstName & FirstName instead of the desired
LastName FirstName & FirstName