Hi folks,
I'm working with ArcGIS Pro v 2.8.2 and have encountered a labelling issue that I'm hoping someone out here can help me troubleshoot.
I created a Python script which extracts Survey123 file geodatabase data and stores them in subfolders, per the survey submitted, with separate .xls of the survey information and a file geodatabase file of the boundary drawn using the in-survey mapping application. The script itself works fine, however, the issue is that the feature classes do no label... except for one. Oddly enough, it is the same boundary that will label each time I download a new file geodatabase of the Survey123. This is also the case when another user tested the script and attempted to label. Given this, this is technically no longer the same feature class file but it is the SAME survey from Survey123. Further, I've intentionally excluded this survey from the file geodatabase and I am still unable to label the remaining feature classes. I am at my wits end with this issue...
What would cause some feature classes to label and other to not? In particular, what could be a reason why this issue remains despite factors like different download times, users, file names?
Some things to note:
- All fields display in the feature class.
- Feature classes have been added to other workspaces - label does not work
- Feature classes have been exported as shapefiles - label does not work
- No other labels are turned on in the workspace.
- The boundary to be labeled is no more then 10 acres of land and the other files in the map project are base layers that do not take long to load.
- Label properties are not advanced. I've tested labelling the "ObjectID" and it does not appear.
Any suggestions or tips would be greatly appreciated!
EDIT:
Added python script, the file gdb that labels (ending in 2924) and one that does not label (ending in 2932).
Python Script and File GDBs
I've attached the Python script. Pleas note, it is specific to the survey I made but relies on only two of the survey fields which can be easily reproduced:
- Field name "ca_county", alias "California county where grown"
- This is a string field ranging between 01 - 58. Aliases are the California county names in alphabetic order (Alameda - Yuba). However, this field can be any range. It just needs to have the exact field name and alias as listed.
- Field name "PQ", alias "PQ Number"
- This is a string field for a unique timestamp (this is alphanumeric, no spaces, no symbols). The script takes whatever alphanumeric characters are in this field. There are no constraints beyond what is in the parentheses above so it can be anything you type. Similar to above, this can be any combination of alphanumeric characters, it just needs to have the exact field and alias names as listed.
The script has three parameters which will need to be set when saving as a tool in a toolbox which you'll see towards the top of the script. Alternatively, the variables can be changed to absolute paths.