You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Often I run an operation that operates on a whole catalog - usually 'copy', sometimes 'validate' or 'merge' - and I'll get an error, that reports a problem, but I have no idea where it occurs. My latest is (I think) a missing license from a 'collection':
Traceback (most recent call last):
File "/Users/cholmes/.local/bin/stac", line 8, in <module>
sys.exit(run_cli())
...
File "/Users/cholmes/.local/lib/python3.7/site-packages/pystac/stac_io.py", line 168, in stac_object_from_dict
d, href=href, root=root, migrate=False, preserve_dict=preserve_dict
File "/Users/cholmes/.local/lib/python3.7/site-packages/pystac/collection.py", line 589, in from_dict
license = d.pop("license")
KeyError: 'license'
(realizing this particular error is probably worth an issue in its own right to better report what happens, but that's not actually why I'm putting in this issue).
The problem is that I think I only have one collection, which definitely has a license, so I have no idea how to try to find where STAC is failing. I suspect it's some errant link to some older file, maybe cached in some way. But it's impossible fo rme track down which of the 50 or so STAC files has the error. The best I can do is run it on smaller and smaller sub-catalogs to try to isolate it, which is painful, and still doesn't get me all the way to which file generated the error.
Describe the solution you'd like
I would like stac errors to show me the location of the file where the exception was raised. Bonus points if it shows me the line numbers.
Describe alternatives you've considered #51 was a similar report, and resulted in the stac validate command, which was a step in the right direction. But it still misses reporting what file an error comes from.
The text was updated successfully, but these errors were encountered:
I did notice that stac validate does have some reporting of the file where an error is, so perhaps this is just a problem with this particular bug, instead of general. But I usually don't 'stac validate' before I do operations, perhaps we do just pre-emptively run 'validate' when someone is running a command that may not work unless it's a valid catalog.
Is your feature request related to a problem? Please describe.
Often I run an operation that operates on a whole catalog - usually 'copy', sometimes 'validate' or 'merge' - and I'll get an error, that reports a problem, but I have no idea where it occurs. My latest is (I think) a missing license from a 'collection':
(realizing this particular error is probably worth an issue in its own right to better report what happens, but that's not actually why I'm putting in this issue).
The problem is that I think I only have one collection, which definitely has a license, so I have no idea how to try to find where STAC is failing. I suspect it's some errant link to some older file, maybe cached in some way. But it's impossible fo rme track down which of the 50 or so STAC files has the error. The best I can do is run it on smaller and smaller sub-catalogs to try to isolate it, which is painful, and still doesn't get me all the way to which file generated the error.
Describe the solution you'd like
I would like stac errors to show me the location of the file where the exception was raised. Bonus points if it shows me the line numbers.
Describe alternatives you've considered
#51 was a similar report, and resulted in the
stac validate
command, which was a step in the right direction. But it still misses reporting what file an error comes from.The text was updated successfully, but these errors were encountered: