GeezerVison is showing github.com — minor fix in GraalPyResources javadoc · elide-dev/graalpython@d780856
File tree
Expand file treeCollapse file tree
Open diff view settings
graalpython/org.graalvm.python.embedding/src/org/graalvm/python/embedding
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: docs/user/Troubleshooting.md +8Lines changed: 8 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -89,6 +89,14 @@ For more details about GraalPy context and Virtual FileSystem configuration plea |
89 | 89 |
|
90 | 90 | ### Maven and Gradle applications |
91 | 91 |
|
| 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 | + |
92 | 100 | #### GraalVM JDK Compatibility |
93 | 101 | To enable runtime compilation when running GraalPy from a Maven or Gradle application, |
94 | 102 | you must use versions of GraalPy and the Polyglot API dependencies that are compatible |
|
Collapse file
Copy file name to clipboardExpand all lines: graalpython/org.graalvm.python.embedding/src/org/graalvm/python/embedding/GraalPyResources.java +6-4Lines changed: 6 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
76 | 76 | * </p> |
77 | 77 | * |
78 | 78 | * <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. |
83 | 85 | * </p> |
84 | 86 | * |
85 | 87 | * <h3>External Directory</h3> |
|