You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I connect to Phoenix using Python, I intend to initialize a connection in each process. However, I encountered the following issues:
User
Traceback (most recent call last):
File "/usr/local/python3.9.13/lib/python3.9/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/usr/local/python3.9.13/lib/python3.9/multiprocessing/pool.py", line 51, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "/usr/appsoft/iespy/beyond_limit/nopandas.py", line 300, in run_bt
bt_instance.run() # ▒▒▒▒▒▒▒▒һ▒▒ run ▒▒▒▒▒ִ▒▒ʵ▒▒▒▒▒Ҫ▒▒
File "/usr/appsoft/iespy/beyond_limit/nopandas.py", line 289, in run
results = list(executor.map(self.Thread_f, time_slot))
File "/usr/local/python3.9.13/lib/python3.9/concurrent/futures/_base.py", line 609, in result_iterator
yield fs.pop().result()
File "/usr/local/python3.9.13/lib/python3.9/concurrent/futures/_base.py", line 446, in result
return self.__get_result()
File "/usr/local/python3.9.13/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
raise self._exception
File "/usr/local/python3.9.13/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/appsoft/iespy/beyond_limit/nopandas.py", line 280, in Thread_f
turbine_data = self.get_ls_data(time_slot)
File "/usr/appsoft/iespy/beyond_limit/nopandas.py", line 113, in get_ls_data
conn = jaydebeapi.connect(
File "/usr/local/python3.9.13/lib/python3.9/site-packages/jaydebeapi/init.py", line 412, in connect
jconn = _jdbc_connect(jclassname, url, driver_args, jars, libs)
File "/usr/local/python3.9.13/lib/python3.9/site-packages/jaydebeapi/init.py", line 198, in _jdbc_connect_jpype
jpype.startJVM(jvm_path, *args, ignoreUnrecognized=True,
File "/usr/local/python3.9.13/lib/python3.9/site-packages/jpype/_core.py", line 166, in startJVM
raise OSError('JVM is already started')
OSError: JVM is already started
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/appsoft/iespy/beyond_limit/nopandas.py", line 337, in
pool.starmap(run_bt, [(id,parameter_id,start_time, stop_time,normal_power,record_interval,duration,save_path,time_period_and_rate_limit_pair,logger) for id in fjid_czid_subxhid])
File "/usr/local/python3.9.13/lib/python3.9/multiprocessing/pool.py", line 372, in starmap
return self._map_async(func, iterable, starmapstar, chunksize).get()
File "/usr/local/python3.9.13/lib/python3.9/multiprocessing/pool.py", line 771, in get
raise self._value
OSError: JVM is already started
I am seeking guidance on addressing the aforementioned challenges. Additionally, are there any recommended approaches to establish multiple connections in order to enhance reading speed? PYTHON
The text was updated successfully, but these errors were encountered:
When I connect to Phoenix using Python, I intend to initialize a connection in each process. However, I encountered the following issues:
User
Traceback (most recent call last):
File "/usr/local/python3.9.13/lib/python3.9/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/usr/local/python3.9.13/lib/python3.9/multiprocessing/pool.py", line 51, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "/usr/appsoft/iespy/beyond_limit/nopandas.py", line 300, in run_bt
bt_instance.run() # ▒▒▒▒▒▒▒▒һ▒▒ run ▒▒▒▒▒ִ▒▒ʵ▒▒▒▒▒Ҫ▒▒
File "/usr/appsoft/iespy/beyond_limit/nopandas.py", line 289, in run
results = list(executor.map(self.Thread_f, time_slot))
File "/usr/local/python3.9.13/lib/python3.9/concurrent/futures/_base.py", line 609, in result_iterator
yield fs.pop().result()
File "/usr/local/python3.9.13/lib/python3.9/concurrent/futures/_base.py", line 446, in result
return self.__get_result()
File "/usr/local/python3.9.13/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
raise self._exception
File "/usr/local/python3.9.13/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/appsoft/iespy/beyond_limit/nopandas.py", line 280, in Thread_f
turbine_data = self.get_ls_data(time_slot)
File "/usr/appsoft/iespy/beyond_limit/nopandas.py", line 113, in get_ls_data
conn = jaydebeapi.connect(
File "/usr/local/python3.9.13/lib/python3.9/site-packages/jaydebeapi/init.py", line 412, in connect
jconn = _jdbc_connect(jclassname, url, driver_args, jars, libs)
File "/usr/local/python3.9.13/lib/python3.9/site-packages/jaydebeapi/init.py", line 198, in _jdbc_connect_jpype
jpype.startJVM(jvm_path, *args, ignoreUnrecognized=True,
File "/usr/local/python3.9.13/lib/python3.9/site-packages/jpype/_core.py", line 166, in startJVM
raise OSError('JVM is already started')
OSError: JVM is already started
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/appsoft/iespy/beyond_limit/nopandas.py", line 337, in
pool.starmap(run_bt, [(id,parameter_id,start_time, stop_time,normal_power,record_interval,duration,save_path,time_period_and_rate_limit_pair,logger) for id in fjid_czid_subxhid])
File "/usr/local/python3.9.13/lib/python3.9/multiprocessing/pool.py", line 372, in starmap
return self._map_async(func, iterable, starmapstar, chunksize).get()
File "/usr/local/python3.9.13/lib/python3.9/multiprocessing/pool.py", line 771, in get
raise self._value
OSError: JVM is already started
I am seeking guidance on addressing the aforementioned challenges. Additionally, are there any recommended approaches to establish multiple connections in order to enhance reading speed? PYTHON
The text was updated successfully, but these errors were encountered: