Skip to content

stac merge error: 'raise ValueError('asset_href msut be absolute.')' #169

@cholmes

Description

@cholmes

Pulling this out as its own issue from #168 (comment)_ as I verified you get the exact same problem if you simply follow the tutorial on using Planet data with CLI.

Basically when you do the stac merge command with planet data it gets the below error. This seems like a regression, as I've done the tutorial before, and tried it again with the 0.2.x stactools and it got the exact same error.

stac merge planet-stacs/analytic/collection.json planet-stacs/visual/collection.json --move-assets --ignore-conflicts 

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/stactools/cli/cli.py", line 40, in run_cli
    cli(prog_name='stac')
  File "/Users/cholmes/.local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Users/cholmes/.local/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/cholmes/.local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/cholmes/.local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/cholmes/.local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/cholmes/.local/lib/python3.7/site-packages/stactools/cli/commands/merge.py", line 66, in merge_command
    child_folder=child_folder)
  File "/Users/cholmes/.local/lib/python3.7/site-packages/stactools/cli/commands/merge.py", line 26, in merge
    child_folder)
  File "/Users/cholmes/.local/lib/python3.7/site-packages/stactools/core/merge.py", line 113, in merge_all_items
    ignore_conflicts=ignore_conflicts)
  File "/Users/cholmes/.local/lib/python3.7/site-packages/stactools/core/merge.py", line 44, in merge_items
    target_item, asset_href, ignore_conflicts=ignore_conflicts)
  File "/Users/cholmes/.local/lib/python3.7/site-packages/stactools/core/copy.py", line 43, in move_asset_file_to_item
    raise ValueError('asset_href msut be absolute.')
ValueError: asset_href msut be absolute.
(venv) cholmes@c02y3151jhd3 tutorial % 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions