Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance compatibility jpype #370

Merged
merged 1 commit into from
Oct 3, 2021

Conversation

hexists
Copy link
Contributor

@hexists hexists commented Oct 3, 2021

Enhance compatibility jpype

내용

  • windows에서 konlpy 사용시 java.nio.file.InvalidPathException 오류를 해결하기 위한 방법입니다.
  • startJVM을 호출할 때, classpath를 karg로 지정하여 문제를 해결합니다.
  • 해당 pr을 통해 windows에서 사용성이 개선될 것으로 기대됩니다.

java.nio.file.InvalidPathException 오류 원인

  • 해당 오류는 startJVM을 호출시 나타나는 오류로, classpath에 *(asterisk)가 포함되어 발생하는 오류입니다.
    ...
    SystemError: java.nio.file.InvalidPathException: Illegal char <*> at index 84: C:\Users\test\AppData\Local\Programs\Python\Python38\Lib\site-packages\konlpy\java\*
    
  • windows에서 Jpype1 버전에 따라 오류가 발생합니다.
  • Jpype1-1.2.0 까지는 오류가 발생하지 않지만, 1.2.1부터는 해당 오류가 발생합니다.
    • Jpype1 내부적으로 어떤 변화가 있었는지 확인해봤지만, 명확한 원인은 알 수 없었습니다.

Jpype startJVM

  • Jpype startJVM을 보면 classpath를 별도로 지정할 수 있습니다.
classpath (str,[str]) – Set the classpath for the JVM. This will override any classpath supplied in the arguments list. A value of None will give no classpath to JVM.

참고

관련 이슈

@minhoryang
Copy link
Member

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants