Select to view content in your preferred language

Map from Layout Template (.pagx) Correct Source, Broken Path(s)

206
5
Jump to solution
a week ago
ZacharyUhlmann1
Frequent Contributor

As the title suggests, when I load a template created from another project into a new project (as is probably always the protocol) and open the map, all the Data Sources are broken.  However when I inspect the properties (Properties --> Source), the paths are displayed correctly.  To fix this, I go and "Change Data Source" or  click the Broken Source red exclamation point and...provide the exact same source (?).

It's systemic, but for information, these are either feature classes from FGDB or shapefiles.

I recently upgraded from 3.0.2 to 3.3.4, and this is new behavior. Has anybody experienced this?  Guessing it's a bug.

EDITED - this was a pagx file NOT lyrx...

thanks,

Zach

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
ZacharyUhlmann1
Frequent Contributor

I submitted a help ticket to ESRI and was grateful for a response and help.  Turns out it's not the line endings, it's a case-sensitivity thing either introduced in Python or the ESRI Python Toolbox.  I suspect the latter for reasons discussed at end, but ultimately I deviated from the Template  at some point in the past and proceeded to cut and paste into most of my Python Toolboxes.  Therefore my problem is probably unlikely to affect anybody else.  I constructed the Toolbox class spelled "ToolBox" and it should be "Toolbox" (notice camel casing in former).

Here is the problematic line that broke my Toolbox:

# Notice the CamelCasing in ToolBox
class ToolBox(object):
    def __init__(self):

According to documentation / template, it should be this:

# Notice no camel casing - just Toolbox
class Toolbox(object):
    def __init__(self):
update_map_series]

 The reason I suspect it's not caused directly by Python updates between minor versions is because 1) PEP8 specifications recommend CamelCasing for Class Names, and 2) my Python Toolboxes functioned when employing Camel Casing to other Python Toolboxes in testing.  

Note that simply changing the spelling to Toolbox fixed all my Toolboxes.

View solution in original post

0 Kudos
5 Replies
Robert_LeClair
Esri Esteemed Contributor

So question for you - you say a layout template but describe a Layer File (*.lyrx).  Are you creating a *.pagx / layout file where the data is then being shown as a broken data link?

In the ArcGIS Pro help documentation for "Save a layout file" - it states "A layout file includes the page, layout elements, and any maps referenced by map frames on the page. The data displayed in these maps, however, is not included in the layout file—only the paths to it. This means that if data cannot be found in the expected location when the layout file is opened, those layers will not draw and the data sources must be repaired." 

So this got me wondering - where is the data coming from?  Local disk?  Shared network drive?  OneDrive? 

0 Kudos
ZacharyUhlmann1
Frequent Contributor

Hey @Robert_LeClair . I troubleshot in a brute force, quick check in a quest to address your question.  First off, I mis<spoke/typed>.  It'a a .pagx file, not a .lyrx (fixed title).  The files are from a cloud-based server called Box, but never had a problem with it before in terms of .pagx files.

However, I created more .pagx from other projects with both server-based files and local.  Turns out these files worked fine.  I tried projects created in 3.0 and in 3.3, and both worked.  So I think it's specifically with the project I originally posted about.  Not sure what the issue is, but if it's a one-off thing, I'll just fix manually and move on.  I suspected it might be global and related to upgrading Pro version.  Thanks for the response! 

PandiyanKesavan
Emerging Contributor

Hi Zachary

This could happen if the data sources are from Cloud Source; you may refresh the path for those layers.

Please follow the quick fix steps below for broken links.

https://www.esri.com/about/newsroom/arcwatch/five-tips-for-fixing-broken-data-links-in-an-arcgis-pro...

Thanks

0 Kudos
LucasDemon
New Contributor

It is like a bug introduced with the upgrade. I've encountered similar issues before when working with feature classes and shapefiles in newer versions. You might want to try clearing the project cache or re-linking the data sources manually to see if that resolves the issue India Board Results 2025. If it's a systemic problem after the update, contacting support could help clarify if it’s a known bug with version 3.3.4.

0 Kudos
ZacharyUhlmann1
Frequent Contributor

I submitted a help ticket to ESRI and was grateful for a response and help.  Turns out it's not the line endings, it's a case-sensitivity thing either introduced in Python or the ESRI Python Toolbox.  I suspect the latter for reasons discussed at end, but ultimately I deviated from the Template  at some point in the past and proceeded to cut and paste into most of my Python Toolboxes.  Therefore my problem is probably unlikely to affect anybody else.  I constructed the Toolbox class spelled "ToolBox" and it should be "Toolbox" (notice camel casing in former).

Here is the problematic line that broke my Toolbox:

# Notice the CamelCasing in ToolBox
class ToolBox(object):
    def __init__(self):

According to documentation / template, it should be this:

# Notice no camel casing - just Toolbox
class Toolbox(object):
    def __init__(self):
update_map_series]

 The reason I suspect it's not caused directly by Python updates between minor versions is because 1) PEP8 specifications recommend CamelCasing for Class Names, and 2) my Python Toolboxes functioned when employing Camel Casing to other Python Toolboxes in testing.  

Note that simply changing the spelling to Toolbox fixed all my Toolboxes.

0 Kudos