castorini / pyserini

Pyserini is a Python toolkit for reproducible information retrieval research with sparse and dense representations.
http://pyserini.io/
Apache License 2.0
1.57k stars 349 forks source link

The anserini library does not load on Windows when the user name is in Chinese. #1880

Closed xzzvsxd closed 1 week ago

xzzvsxd commented 2 months ago

ERROR IS : Traceback (most recent call last): File "", line 189, in _run_module_as_main File "", line 112, in _get_module_details File "C:\Users\李星宇\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyserini\index__init.py", line 21, in from .lucene._base import Document, Generator, IndexTerm, Posting, IndexReader File "C:\Users\李星宇\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyserini\index\lucene__init__.py", line 17, in from ._base import Document, Generator, IndexTerm, Posting, IndexReader File "C:\Users\李星宇\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyserini\index\lucene_base.py", line 30, in from pyserini.analysis import get_lucene_analyzer, JAnalyzer, JAnalyzerUtils File "C:\Users\李星宇\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyserini\analysis\init__.py", line 17, in from ._base import get_lucene_analyzer, Analyzer, JAnalyzer, JAnalyzerUtils, JDefaultEnglishAnalyzer, JWhiteSpaceAnalyzer File "C:\Users\李星宇\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyserini\analysis_base.py", line 23, in JAnalyzer = autoclass('org.apache.lucene.analysis.Analyzer') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\李星宇\AppData\Local\Programs\Python\Python312\Lib\site-packages\jnius\reflect.py", line 209, in autoclass c = find_javaclass(clsname) ^^^^^^^^^^^^^^^^^^^^^^^ File "jnius\jnius_export_func.pxi", line 22, in jnius.find_javaclass File "jnius\jnius_utils.pxi", line 79, in jnius.check_exception jnius.JavaException: JVM exception occurred: org/apache/lucene/analysis/Analyzer java.lang.NoClassDefFoundError

CURE IS : Changing the path to the jar package that stores anserini to plain English will eliminate the error, but it will affect the experience.

lintool commented 1 week ago

Hi @xzzvsxd - thanks for reporting this. Noted.