Skip to content

Forgetting to set JAVA_HOME leads to a somewhat cryptic error message. #339

@odinsbane

Description

@odinsbane

When I try to init pyimagej on osx I get the following error. (truncated!)

File "env/lib/python3.13/site-packages/scyjava/_jvm.py", line 74, in jvm_version
p = Path(default_jvm_path)
TypeError: argument should be a str or an os.PathLike object where fspath returns a str, not 'bytes'

If I point JAVA_HOME at a valid java jdk then I don't get this error.

I think there are two points here:

  • It is failing to use a fallback version check because of an unexepected error.
  • It doesn't report this error is occuring while trying to find java (though implied in the stacktrace)

Thanks!

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