Skip to content

Certain arguments passed to main class break endpoint resolution #92

Open
@hanslovsky

Description

@hanslovsky

I use jgo to start an image viewer. I added an option to fetch images via grpc and pass the grpc host via

grpc://<hostname>:<port>

to the main class. When I run the viewer on the command line with jgo, endpoint resolution breaks. This works with arbitrary endpoints, e.g. here I use org.scijava:parsington as example:
Works without `grpc://:

$ jgo org.scijava:parsington
> 

Breaks with `grpc://::

$ jgo org.scijava:parsington -- -d grpc://localhost:1234
INFO 2023-03-01 16:32:11,464: First time start-up may be slow. Downloaded dependencies will be cached for shorter start-up times in subsequent executions.
Traceback (most recent call last):
  File "/home/zottel/.local/bin/jgo", line 8, in <module>
    sys.exit(main())
  File "/home/zottel/.local/lib/python3.10/site-packages/jgo/jgo.py", line 404, in _jgo_main
    completed_process = run(parser, argv=argv, stdout=stdout, stderr=stderr)
  File "/home/zottel/.local/lib/python3.10/site-packages/jgo/jgo.py", line 781, in run
    primary_endpoint, workspace = resolve_dependencies(
  File "/home/zottel/.local/lib/python3.10/site-packages/jgo/jgo.py", line 577, in resolve_dependencies
    os.makedirs(workspace, exist_ok=True)
  File "/usr/lib/python3.10/os.py", line 215, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/lib/python3.10/os.py", line 215, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/lib/python3.10/os.py", line 225, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '//localhost'

Notes

  1. I tried adding -- to distinguish between jgo and main class arguments. Same effect with or without --
  2. I see this behavior with 1.0.5 and current main

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions