oracle / graalpython

A Python 3 implementation built on GraalVM
Other
1.2k stars 104 forks source link

Getting LLVMPolyglotException when import numpy #272

Closed limanhei closed 2 years ago

limanhei commented 2 years ago

I am trying to run python from Java/Kotlin. The python script worked correctly when running on graalpython in command prompt. However, when I Run inside Java/Kotlin, it throws LLVMPolyglotException: Cannot read from index 0 of polyglot value. In my python file I didn't do anything except import numpy, didn't actually used the lib.

My apologies for doing screenshot instead of putting the codes here.

16570894216253944397048163920640 16570895315252920847721682817699 16570895752528622391312831906987

msimacek commented 2 years ago

Hi @limanhei, you also need to enable host access with allowHostAccess(HostAccess.ALL).

limanhei commented 2 years ago

thanks a lot