Open gaurav-t-sca opened 2 years ago
This is caused by a quirk of python where global variables are copied into different .py files and not referenced.
working on a fix
branch fix/globals as an update that resolves the issue. Will test it more carefully later.
@gaurav-t-sca is this resolved?
I still have the same problem. With PyBoof 0.43.1, python 3.6.9, py4j 0.10.9.7.
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: pyboof/PyBoofEntryPoint has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:621)
Failed to successfully launch the JVM after 5 seconds. Aborting
Traceback (most recent call last):
File "/home/jaka/.virtualenvs/yolov4/lib/python3.6/site-packages/py4j/java_gateway.py", line 982, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jaka/.virtualenvs/yolov4/lib/python3.6/site-packages/py4j/java_gateway.py", line 1132, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "ztest_zbar.py", line 9, in <module>
import pyboof as pb
File "/home/jaka/.virtualenvs/yolov4/lib/python3.6/site-packages/pyboof/__init__.py", line 250, in <module>
python_port=int(os.environ.get('PYBOOF_PYTHON_PORT', 25334)))
File "/home/jaka/.virtualenvs/yolov4/lib/python3.6/site-packages/pyboof/__init__.py", line 84, in init_pyboof
__init_memmap(size_mb)
File "/home/jaka/.virtualenvs/yolov4/lib/python3.6/site-packages/pyboof/__init__.py", line 156, in __init_memmap
pbg.gateway.jvm.pyboof.PyBoofEntryPoint.initializeMmap(mmap_path, size_mb)
File "/home/jaka/.virtualenvs/yolov4/lib/python3.6/site-packages/py4j/java_gateway.py", line 1715, in __getattr__
"\n" + proto.END_COMMAND_PART)
File "/home/jaka/.virtualenvs/yolov4/lib/python3.6/site-packages/py4j/java_gateway.py", line 1036, in send_command
connection = self._get_connection()
File "/home/jaka/.virtualenvs/yolov4/lib/python3.6/site-packages/py4j/java_gateway.py", line 984, in _get_connection
connection = self._create_connection()
File "/home/jaka/.virtualenvs/yolov4/lib/python3.6/site-packages/py4j/java_gateway.py", line 990, in _create_connection
connection.start()
File "/home/jaka/.virtualenvs/yolov4/lib/python3.6/site-packages/py4j/java_gateway.py", line 1144, in start
raise Py4JNetworkError(msg, e)
py4j.protocol.Py4JNetworkError: An error occurred while trying to connect to the Java server (127.0.0.1:25333)
Steps to replicate on version 0.40.1:
The error thrown is:
In the same interpreter, if I run
pb.check_jvm(False)
afterwards, it returnsTrue
Versions:
cat /etc/os-release
->Debian GNU/Linux 11 (bullseye)
Any help would be greatly appreciated. Thanks in advance!