arkouda
arkouda copied to clipboard
Error when dismounting from Arkouda while still connected to a server
Steps to reproduce:
- Connect to Arkouda server
- Create a pdarray
- Run
exit()
in Python with server still running
This will result in:
Exception ignored in: <function pdarray.__del__ at 0x1127a4790>
Traceback (most recent call last):
File "/path/arkouda/arkouda/pdarrayclass.py", line 187, in __del__
File "/path/arkouda/arkouda/client.py", line 661, in generic_msg
File "/path/arkouda/arkouda/client.py", line 604, in _json_args_to_str
File "/path/arkouda/arkouda/message.py", line 201, in factory
ImportError: sys.meta_path is None, Python is likely shutting down
This is happening because of the from arkouda.pdarrayclass import pdarray
that was added in https://github.com/Bears-R-Us/arkouda/pull/1809 since Python is trying to import something that it has already left behind.
@bmcdonald3 - I tried replicating this and was able to successfully run exit()
. I tried running in python
and in ipython
and both exited successfully with no error.
I'm having the same error after updating to v2022.10.13
.
Traceback (most recent call last):
File "/home/chris/Arkouda/arkouda/arkouda/pdarrayclass.py", line 187, in __del__
File "/home/chris/Arkouda/arkouda/arkouda/client.py", line 660, in generic_msg
File "/home/chris/Arkouda/arkouda/arkouda/client.py", line 607, in _json_args_to_str
File "/home/chris/Arkouda/arkouda/arkouda/message.py", line 201, in factory
ImportError: sys.meta_path is None, Python is likely shutting down
Here is some info on my setup:
$CHPL_HOME/util/printchplenv --anonymize
returns this:
CHPL_TARGET_COMPILER: llvm
CHPL_TARGET_ARCH: x86_64
CHPL_TARGET_CPU: native
CHPL_LOCALE_MODEL: flat
CHPL_COMM: none
CHPL_TASKS: qthreads
CHPL_LAUNCHER: none
CHPL_TIMERS: generic
CHPL_UNWIND: none
CHPL_MEM: jemalloc
CHPL_ATOMICS: cstdlib
CHPL_GMP: bundled
CHPL_HWLOC: bundled
CHPL_RE2: bundled
CHPL_LLVM: bundled
CHPL_AUX_FILESYS: none
And ak.get_config()
returns:
{'arkoudaVersion': 'v2022.10.13+5.g1708f2c1', 'chplVersion': '1.27.0', 'ZMQVersion': '4.3.4', 'HDF5Version': '1.12.1', 'serverHostname': 'DESKTOP-PIJ1P61', 'ServerPort': 5555, 'numLocales': 1, 'numPUs': 4, 'maxTaskPar': 4, 'physicalMemory': 13290168320, 'distributionType': 'domain(1,int(64),false)', 'LocaleConfigs': [{'id': 0, 'name': 'DESKTOP-PIJ1P61', 'numPUs': 4, 'maxTaskPar': 4, 'physicalMemory': 13290168320}], 'authenticate': False, 'logLevel': 'INFO', 'regexMaxCaptures': 20, 'byteorder': 'little', 'ARROW_VERSION': '7.0.0'}
Weirdly enough, I'm able to avoid the tracebacks with this code:
import arkouda as ak
ak.connect()
crash = ak.array([1, 2, 3, 4])
exit()
But putting the pdarray into a class results in the traceback:
import arkouda as ak
ak.connect()
class test:
crash = ak.array([1, 2, 3, 4])
exit()