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

FGDC metadata, step 2 (v1.6.13) #86

Open
ecrider-usgs opened this issue Feb 24, 2022 · 3 comments
Open

FGDC metadata, step 2 (v1.6.13) #86

ecrider-usgs opened this issue Feb 24, 2022 · 3 comments

Comments

@ecrider-usgs
Copy link

Hello, I am trying to use the FGDC metadata script from the most current version and keep getting this error. I've modified the metadata to remove non-ascii characters and tried other modifications to the metadata to see if I could get the script to work with no success. Not sure what I'm getting wrong.

  • Allen

Traceback (most recent call last):
File "C:\gems-tools-arcmap-1.6.13\gems-tools-arcmap-1.6.13\Scripts\GeMS_FGDC2_Arc10.py", line 515, in
fixObjXML(objName,objType,objLoc,domMR)
File "C:\gems-tools-arcmap-1.6.13\gems-tools-arcmap-1.6.13\Scripts\GeMS_FGDC2_Arc10.py", line 439, in fixObjXML
dom = copy.deepcopy(domMR)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 163, in deepcopy
y = copier(x, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 298, in _deepcopy_inst
state = deepcopy(state, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 163, in deepcopy
y = copier(x, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 257, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 190, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 351, in _reconstruct
item = deepcopy(item, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 163, in deepcopy
y = copier(x, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 298, in _deepcopy_inst
state = deepcopy(state, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 163, in deepcopy
y = copier(x, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 257, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 163, in deepcopy
y = copier(x, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 298, in _deepcopy_inst
state = deepcopy(state, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 163, in deepcopy
y = copier(x, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 257, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 190, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 351, in _reconstruct
item = deepcopy(item, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 163, in deepcopy
y = copier(x, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 298, in _deepcopy_inst
state = deepcopy(state, memo)
File "C:\Python27\ArcGIS10.8\Lib\copy.py", line 163, in deepcopy
y = copier(x, memo)
RuntimeError: maximum recursion depth exceeded

Failed to execute (MetadataFGDC-2).

@ethoms-usgs
Copy link
Collaborator

Could you send me a copy of the XML you are using for the second parameter?
Also, in ArcMap, could you open the Python interpreter window and type the following two commands?

import sys
print sys.getrecursionlimit()

and tell me what shows up? The default value is 1000, so I am just curious of that's what yours is set to.

@ecrider-usgs
Copy link
Author

Yeah I thought the recursion limit might be set lower for some reason, but it definitely is 1000.

CharlestonSCOFR2013-1030-metadata.zip

@ethoms-usgs
Copy link
Collaborator

I looked at this by opening a python prompt and trying to make a deepcopy of the xml file. With the default recursion limit, I got the same error you did. I then started resetting the recursion limit with sys.setrecursionlimit(). 2000 produced the same result and 2500 simply crashed python so I, at least on my laptop of middling quality, can't set the maximum high enough to make a deepcopy of the file. YMMV.

But once I deleted all of your place keywords, I could make the copy with a limit of 1000. I don't know if your XML file is too large overall or if there are just too many children of <place>, but I suspect the latter. I have never seen a metadata file with so many. I would reconsider trying to include them all.

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

2 participants