Skip to content

Commit d780856

Browse files
committed
minor fix in GraalPyResources javadoc
1 parent 8b3ac06 commit d780856

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

docs/user/Troubleshooting.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ For more details about GraalPy context and Virtual FileSystem configuration plea
8989

9090
### Maven and Gradle applications
9191

92+
#### ImportError reports "unknown location"
93+
A possible cause of an `ImportError` ending with `(unknown location)` when running a GraalPy Java Embedding project might be
94+
that an embedded Python package was built for a different operating system. If you see an error like the following:
95+
```
96+
ImportError: cannot import name 'exceptions' from 'cryptography.hazmat.bindings._rust' (unknown location)
97+
```
98+
You probably need to rebuild your project on the correct operating system before running it.
99+
92100
#### GraalVM JDK Compatibility
93101
To enable runtime compilation when running GraalPy from a Maven or Gradle application,
94102
you must use versions of GraalPy and the Polyglot API dependencies that are compatible

graalpython/org.graalvm.python.embedding/src/org/graalvm/python/embedding/GraalPyResources.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,12 @@
7676
* </p>
7777
*
7878
* <p>
79-
* In order to make this work, it is necessary for those embedded resources to have their <b>root
80-
* directory</b> set to <code>/org.graalvm.python.vfs</code> which in python code will be mapped to
81-
* the virtual filesystem <b>mount point</b>, by default <code>/graalpy_vfs</code>. Refer to
82-
* {@link VirtualFileSystem.Builder} documentation for more details.
79+
* In order to make this work, it is necessary for those embedded resources to have a common
80+
* <b>resource root directory</b>. The default value is <code>/org.graalvm.python.vfs</code>,
81+
* however the recommended convention is to use {@code GRAALPY-VFS/{groupId}/{artifactId}}. This
82+
* root directory will then be in python code mapped to the virtual filesystem <b>mount point</b>,
83+
* by default <code>/graalpy_vfs</code>. Refer to
84+
* {@link VirtualFileSystem.Builder#resourceDirectory(String)} documentation for more details.
8385
* </p>
8486
*
8587
* <h3>External Directory</h3>

0 commit comments

Comments
 (0)