Skip to content

PermissionDenied Error when using with j4rs #2315

Discussion options

You must be logged in to vote

Thank you! I'm getting a different error

pyo3_runtime.PanicException: called `Result::unwrap()` on an `Err` value: GeneralError("Error { kind: NotFound, message: \"No such file or directory (os error 2)\" }")

but the cause is probably the same:

j4rs tries to find the jassets path which is under target/debug/jassets. It tries to find that in the same directory (or up) of the current executable. For Rust-only, this is under target/debug/... which works. For Python, it is /usr/bin/python, and there is no "jassets" there.

You need to set the proper path with https://docs.rs/j4rs/latest/j4rs/struct.JvmBuilder.html#method.with_base_path - this worked for me:

    let base = fs::canonicalize("./…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@wangxiaoying
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@wangxiaoying
Comment options

Answer selected by wangxiaoying
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants