-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Map
object fails to initialize when called from an existing Item
#2109
Comments
Map
object fails to initialize when called from an Item
Map
object fails to initialize when called from an existing Item
@ccone-pattern When you say the map was previously made with python do you mean this new version of mapping or with the older WebMap class? Can you post a screenshot of the actual issue or provide an example item for this? The one you have posted suggests that something is being passed into the dataclasses that it does not recognize. Also this may not be it but can you initialize the map with |
@ccone-pattern I have dug into this a bit and it seems to be an error linked to pydantic (which we are using for validation). I was able to avoid the error by downgrading to pydantic v2.4.2 but we are tracking the issue on the pydantic github: |
@ccone-pattern Do you have group layer in your map? I think that is the issue. I have put in a fix on our end for the next release |
We have relaxed the validation of existing items in the Map class. This should resolve this issue and we have not been able to find an issue with our existing maps. This will be released March 2025 |
Describe the bug
Map object fails to populate given an
Item
of type: WebMap that was previously generated and saved from python. This map item is fully interactable within AGOL.To Reproduce
Steps to reproduce the behavior:
error:
Screenshots
screenshot from vscode debugger displaying valid item fetched directly before initializing Map
Expected behavior
A valid
Map
object based on the item fetched from GIS.contentand/or
Explicit description of any invalid json syntax in WebMap's definition
Platform (please complete the following information):
Additional context
Python 3.12.7
The text was updated successfully, but these errors were encountered: