We have paths and file names with special characters: L:\Path\MATT'S ADDN BLK 1,2,&3.TIF. I know this is a terrible thing to do, but it was done long ago before my time here. My guess is it is due to the special characters.
The paths are stored in an attribute and I am using that as a hyperlink in a custom popup. The ones which do not have special characters of course open fine. But I get the following error below on the ones that do. Hitting Yes does nothing.
This is not a problem in using the ArcMap hyperlink (lighting bolt).
arcmap equivalency arcmap equivalent
Solved! Go to Solution.
Depends on how the strings are quoted. How software interprets a path is another issue, but even microsoft recommends against space and punctuation. Unix is more forgiving
p = r'L:\Path\MATT'S ADDN BLK 1,2,&3.TIF' # ---- single quote raw encoding
File "<ipython-input-5-7dbd339e92b6>", line 1
p = r'L:\Path\MATT'S ADDN BLK 1,2,&3.TIF'
SyntaxError: invalid syntax
p = r"L:\Path\MATT'S ADDN BLK 1,2,&3.TIF" # ---- double quote raw encoding
q = p.replace("\\", "/")
"L:/Path/MATT'S ADDN BLK 1,2,&3.TIF" # ---- safe anywhere
I tried using Arcade to workaround the link issue, and I think internal Popup window code is interfering. I have raised this with the team that works on Popups.
For example when a file path is typed in, the popup changes the string
The popup link trips over the ' in the file name.
Customer support thinks it is because of Arcade, not the popup.
"...I was discussing this case with my manager, and we believe the differences seen in hyperlink behavior between ArcMap and ArcGIS Pro relate to how the two programs are coded. ArcMap does not have Arcade integrated into its background processes, while ArcGIS Pro does. This changes how the two programs function at a fundamental level..."
So this leads to why is Arcade the only option for customizing popup's other than getting into the SDK?