Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Altas may not export if one or more layers are missing #50

Open
andrewphilipsmith opened this issue Jun 12, 2020 · 0 comments
Open

Altas may not export if one or more layers are missing #50

andrewphilipsmith opened this issue Jun 12, 2020 · 0 comments

Comments

@andrewphilipsmith
Copy link
Member

How to reproduce

  1. Have a MapRecipe within includes multiple layers and an atlas definition.
  2. Make just the data for the index layer available but no data for any other layers.
  3. Run mapchef.

Expected behaviour

Mapchef should export a pdf for each for the polygons in the index layer, just with the missing data missing from the maps. (This is the same behaviour as would occur if it were not an atlas).

Actual behaviour

The export fails with the following error:

Traceback (most recent call last):
  File "c:\gocd\agent\pipelines\kenya\mapy-arcmap\mapactionpy_arcmap\arcmap_runner.py", line 627, in <module>
    main()
  File "c:\gocd\agent\pipelines\kenya\mapy-arcmap\mapactionpy_arcmap\arcmap_runner.py", line 619, in main
    runner.export()
  File "c:\gocd\agent\pipelines\kenya\mapy-arcmap\mapactionpy_arcmap\arcmap_runner.py", line 269, in export
    export_params = self._do_export(export_params)
  File "c:\gocd\agent\pipelines\kenya\mapy-arcmap\mapactionpy_arcmap\arcmap_runner.py", line 320, in _do_export
    self._export_atlas(self.recipe, arc_mxd, export_dir, core_file_name)
  File "c:\gocd\agent\pipelines\kenya\mapy-arcmap\mapactionpy_arcmap\arcmap_runner.py", line 364, in _export_atlas
    arc_lyr = arcpy.mapping.ListLayers(arc_mxd, None, arc_df)[lyr_index]
IndexError: list index out of range
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant