hzovaro / spaxelsleuth

A package for analysing data from large integral field unit surveys such as the SAMI and Hector Galaxy Surveys.
MIT License
1 stars 1 forks source link

Issues with multithreading when running on Mac #7

Closed hzovaro closed 1 year ago

hzovaro commented 1 year ago

When running the following on my local machine (either with python script.py or %run script.py in ipython):

import os
from spaxelsleuth import load_user_config
load_user_config("/Users/u5708159/Desktop/spaxelsleuth_test/.myconfig.json")
from spaxelsleuth.loaddata.sami import make_sami_metadata_df
nthreads = 4

# Create the DataFrames
make_sami_metadata_df(recompute_continuum_SNRs=True, nthreads=nthreads)

I get the following output (after interrupting):

utils.py (160) _init_num_threads(): INFO: NumExpr defaulting to 8 threads.
sami.py (195) make_sami_metadata_df(): INFO: creating metadata DataFrame...
sami.py (431) make_sami_metadata_df(): INFO: computing distances...
sami.py (471) make_sami_metadata_df(): INFO: computing continuum SNRs...
sami.py (480) make_sami_metadata_df(): INFO: computing continuum SNRs on 4 threads...
utils.py (160) _init_num_threads(): INFO: NumExpr defaulting to 8 threads.
utils.py (160) _init_num_threads(): INFO: NumExpr defaulting to 8 threads.
utils.py (160) _init_num_threads(): INFO: NumExpr defaulting to 8 threads.
utils.py (160) _init_num_threads(): INFO: NumExpr defaulting to 8 threads.
sami.py (195) make_sami_metadata_df(): INFO: creating metadata DataFrame...
sami.py (195) make_sami_metadata_df(): INFO: creating metadata DataFrame...
sami.py (195) make_sami_metadata_df(): INFO: creating metadata DataFrame...
sami.py (195) make_sami_metadata_df(): INFO: creating metadata DataFrame...
sami.py (431) make_sami_metadata_df(): INFO: computing distances...
sami.py (431) make_sami_metadata_df(): INFO: computing distances...
sami.py (431) make_sami_metadata_df(): INFO: computing distances...
sami.py (431) make_sami_metadata_df(): INFO: computing distances...
sami.py (471) make_sami_metadata_df(): INFO: computing continuum SNRs...
sami.py (480) make_sami_metadata_df(): INFO: computing continuum SNRs on 4 threads...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 125, in _main
    prepare(preparation_data)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 236, in prepare
    _fixup_main_from_path(data['init_main_from_path'])
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
    main_content = runpy.run_path(main_path,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 289, in run_path
sami.py (471) make_sami_metadata_df(): INFO: computing continuum SNRs...
sami.py (480) make_sami_metadata_df(): INFO: computing continuum SNRs on 4 threads...
    return _run_module_code(code, init_globals, run_name,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/scripts/basic_sami_script.py", line 11, in <module>
    make_sami_metadata_df(recompute_continuum_SNRs=True, nthreads=nthreads)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/spaxelsleuth/loaddata/sami.py", line 481, in make_sami_metadata_df
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 125, in _main
    prepare(preparation_data)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 236, in prepare
    pool = multiprocessing.Pool(nthreads)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/context.py", line 119, in Pool
    _fixup_main_from_path(data['init_main_from_path'])
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
    main_content = runpy.run_path(main_path,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 289, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/scripts/basic_sami_script.py", line 11, in <module>
    make_sami_metadata_df(recompute_continuum_SNRs=True, nthreads=nthreads)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/spaxelsleuth/loaddata/sami.py", line 481, in make_sami_metadata_df
    pool = multiprocessing.Pool(nthreads)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/context.py", line 119, in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 215, in __init__
    return Pool(processes, initializer, initargs, maxtasksperchild,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 215, in __init__
    self._repopulate_pool()
    self._repopulate_pool()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 306, in _repopulate_pool
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 306, in _repopulate_pool
    return self._repopulate_pool_static(self._ctx, self.Process,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 329, in _repopulate_pool_static
    return self._repopulate_pool_static(self._ctx, self.Process,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 329, in _repopulate_pool_static
    w.start()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/process.py", line 121, in start
    w.start()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/context.py", line 288, in _Popen
    self._popen = self._Popen(self)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/context.py", line 288, in _Popen
    return Popen(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    return Popen(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
    super().__init__(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 42, in _launch
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 154, in get_preparation_data
    _check_not_importing_main()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 134, in _check_not_importing_main
    raise RuntimeError('''
RuntimeError: 
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.
sami.py (471) make_sami_metadata_df(): INFO: computing continuum SNRs...
    self._launch(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 42, in _launch
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 154, in get_preparation_data
    _check_not_importing_main()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 134, in _check_not_importing_main
    raise RuntimeError('''
RuntimeError: 
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.
sami.py (480) make_sami_metadata_df(): INFO: computing continuum SNRs on 4 threads...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 125, in _main
    prepare(preparation_data)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 236, in prepare
    _fixup_main_from_path(data['init_main_from_path'])
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
    main_content = runpy.run_path(main_path,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 289, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/scripts/basic_sami_script.py", line 11, in <module>
    make_sami_metadata_df(recompute_continuum_SNRs=True, nthreads=nthreads)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/spaxelsleuth/loaddata/sami.py", line 481, in make_sami_metadata_df
    pool = multiprocessing.Pool(nthreads)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/context.py", line 119, in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 215, in __init__
    self._repopulate_pool()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 306, in _repopulate_pool
    return self._repopulate_pool_static(self._ctx, self.Process,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 329, in _repopulate_pool_static
sami.py (471) make_sami_metadata_df(): INFO: computing continuum SNRs...
    w.start()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/context.py", line 288, in _Popen
    return Popen(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 42, in _launch
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 154, isami.py (480) make_sami_metadata_df(): INFO: computing continuum SNRs on 4 threads...
n get_preparation_data
    _check_not_importing_main()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 134, in _check_not_importing_main
    raise RuntimeError('''
RuntimeError: 
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 125, in _main
    prepare(preparation_data)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 236, in prepare
    _fixup_main_from_path(data['init_main_from_path'])
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
    main_content = runpy.run_path(main_path,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 289, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/scripts/basic_sami_script.py", line 11, in <module>
    make_sami_metadata_df(recompute_continuum_SNRs=True, nthreads=nthreads)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/spaxelsleuth/loaddata/sami.py", line 481, in make_sami_metadata_df
    pool = multiprocessing.Pool(nthreads)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/context.py", line 119, in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 215, in __init__
    self._repopulate_pool()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 306, in _repopulate_pool
    return self._repopulate_pool_static(self._ctx, self.Process,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 329, in _repopulate_pool_static
    w.start()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/context.py", line 288, in _Popen
    return Popen(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 42, in _launch
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 154, in get_preparation_data
    _check_not_importing_main()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 134, in _check_not_importing_main
    raise RuntimeError('''
RuntimeError: 
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.
utils.py (160) _init_num_threads(): INFO: NumExpr defaulting to 8 threads.
utils.py (160) _init_num_threads(): INFO: NumExpr defaulting to 8 threads.
utils.py (160) _init_num_threads(): INFO: NumExpr defaulting to 8 threads.
utils.py (160) _init_num_threads(): INFO: NumExpr defaulting to 8 threads.
sami.py (195) make_sami_metadata_df(): INFO: creating metadata DataFrame...
sami.py (195) make_sami_metadata_df(): INFO: creating metadata DataFrame...
sami.py (195) make_sami_metadata_df(): INFO: creating metadata DataFrame...
sami.py (195) make_sami_metadata_df(): INFO: creating metadata DataFrame...
sami.py (431) make_sami_metadata_df(): INFO: computing distances...
sami.py (431) make_sami_metadata_df(): INFO: computing distances...
sami.py (431) make_sami_metadata_df(): INFO: computing distances...
sami.py (431) make_sami_metadata_df(): INFO: computing distances...
sami.py (471) make_sami_metadata_df(): INFO: computing continuum SNRs...
sami.py (480) make_sami_metadata_df(): INFO: computing continuum SNRs on 4 threads...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 125, in _main
    prepare(preparation_data)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 236, in prepare
    _fixup_main_from_path(data['init_main_from_path'])
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
    main_content = runpy.run_path(main_path,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 289, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/scripts/basic_sami_script.py", line 11, in <module>
    make_sami_metadata_df(recompute_continuum_SNRs=True, nthreads=nthreads)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/spaxelsleuth/loaddata/sami.py", line 481, in make_sami_metadata_df
    pool = multiprocessing.Pool(nthreads)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/context.py", line 119, in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 215, in __init__
    self._repopulate_pool()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 306, in _repopulate_pool
    return self._repopulate_pool_static(self._ctx, self.Process,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 329, in _repopulate_pool_static
    w.start()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/context.py", line 288, in _Popen
    return Popen(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 42, in _launch
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 154, in get_preparation_data
    _check_not_importing_main()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 134, in _check_not_importing_main
    raise RuntimeError('''
RuntimeError: 
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.
sami.py (471) make_sami_metadata_df(): INFO: computing continuum SNRs...
sami.py (480) make_sami_metadata_df(): INFO: computing continuum SNRs on 4 threads...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 125, in _main
    prepare(preparation_data)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 236, in prepare
    _fixup_main_from_path(data['init_main_from_path'])
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
    main_content = runpy.run_path(main_path,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 289, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/scripts/basic_sami_script.py", line 11, in <module>
    make_sami_metadata_df(recompute_continuum_SNRs=True, nthreads=nthreads)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/spaxelsleuth/loaddata/sami.py", line 481, in make_sami_metadata_df
    pool = multiprocessing.Pool(nthreads)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/context.py", line 119, in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 215, in __init__
    self._repopulate_pool()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 306, in _repopulate_pool
    return self._repopulate_pool_static(self._ctx, self.Process,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 329, in _repopulate_pool_static
    w.start()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/context.py", line 288, in _Popen
    return Popen(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 42, in _launch
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 154, in get_preparation_data
    _check_not_importing_main()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 134, in _check_not_importing_main
    raise RuntimeError('''
RuntimeError: 
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.
sami.py (471) make_sami_metadata_df(): INFO: computing continuum SNRs...
sami.py (480) make_sami_metadata_df(): INFO: computing continuum SNRs on 4 threads...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 125, in _main
    prepare(preparation_data)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 236, in prepare
    _fixup_main_from_path(data['init_main_from_path'])
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
    main_content = runpy.run_path(main_path,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 289, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/scripts/basic_sami_script.py", line 11, in <module>
    make_sami_metadata_df(recompute_continuum_SNRs=True, nthreads=nthreads)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/spaxelsleuth/loaddata/sami.py", line 481, in make_sami_metadata_df
    pool = multiprocessing.Pool(nthreads)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/context.py", line 119, in Pool
sami.py (471) make_sami_metadata_df(): INFO: computing continuum SNRs...
    return Pool(processes, initializer, initargs, maxtasksperchild,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 215, in __init__
    self._repopulate_pool()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 306, in _repopulate_pool
    return self._repopulate_pool_static(self._ctx, self.Process,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 329, in _repopulate_pool_static
    w.start()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/context.py", line 288, in _Popen
    return Popen(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 32, in __init__
sami.py (480) make_sami_metadata_df(): INFO: computing continuum SNRs on 4 threads...
    super().__init__(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 42, in _launch
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 154, in get_preparation_data
    _check_not_importing_main()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 134, in _check_not_importing_main
    raise RuntimeError('''
RuntimeError: 
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 125, in _main
    prepare(preparation_data)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 236, in prepare
    _fixup_main_from_path(data['init_main_from_path'])
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
    main_content = runpy.run_path(main_path,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 289, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 96, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/scripts/basic_sami_script.py", line 11, in <module>
    make_sami_metadata_df(recompute_continuum_SNRs=True, nthreads=nthreads)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/spaxelsleuth/loaddata/sami.py", line 481, in make_sami_metadata_df
    pool = multiprocessing.Pool(nthreads)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/context.py", line 119, in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 215, in __init__
    self._repopulate_pool()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 306, in _repopulate_pool
    return self._repopulate_pool_static(self._ctx, self.Process,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 329, in _repopulate_pool_static
    w.start()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/context.py", line 288, in _Popen
    return Popen(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/popen_spawn_posix.py", line 42, in _launch
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 154, in get_preparation_data
    _check_not_importing_main()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 134, in _check_not_importing_main
    raise RuntimeError('''
RuntimeError: 
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.
utils.py (160) _init_num_threads(): INFO: NumExpr defaulting to 8 threads.
utils.py (160) _init_num_threads(): INFO: NumExpr defaulting to 8 threads.
utils.py (160) _init_num_threads(): INFO: NumExpr defaulting to 8 threads.
utils.py (160) _init_num_threads(): INFO: NumExpr defaulting to 8 threads.
^CTraceback (most recent call last):
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/scripts/basic_sami_script.py", line 11, in <module>
Traceback (most recent call last):
  File "<string>", line 1, in <module>
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 116, in spawn_main
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 116, in spawn_main
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 116, in spawn_main
    make_sami_metadata_df(recompute_continuum_SNRs=True, nthreads=nthreads)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/spaxelsleuth/loaddata/sami.py", line 482, in make_sami_metadata_df
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 125, in _main
    exitcode = _main(fd, parent_sentinel)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 125, in _main
    exitcode = _main(fd, parent_sentinel)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 125, in _main
    exitcode = _main(fd, parent_sentinel)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 125, in _main
    prepare(preparation_data)
    prepare(preparation_data)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 236, in prepare
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 236, in prepare
    prepare(preparation_data)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 236, in prepare
    prepare(preparation_data)
    res_list = pool.map(_compute_snr, args_list)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 236, in prepare
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 367, in map
    _fixup_main_from_path(data['init_main_from_path'])
    _fixup_main_from_path(data['init_main_from_path'])
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
    _fixup_main_from_path(data['init_main_from_path'])
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
    _fixup_main_from_path(data['init_main_from_path'])
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
    main_content = runpy.run_path(main_path,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 289, in run_path
    main_content = runpy.run_path(main_path,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 289, in run_path
    main_content = runpy.run_path(main_path,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 289, in run_path
    main_content = runpy.run_path(main_path,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 289, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 96, in _run_module_code
    return _run_module_code(code, init_globals, run_name,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 96, in _run_module_code
    return _run_module_code(code, init_globals, run_name,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 96, in _run_module_code
    return _run_module_code(code, init_globals, run_name,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 96, in _run_module_code
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 768, in get
    _run_code(code, mod_globals, init_globals,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 86, in _run_code
    _run_code(code, mod_globals, init_globals,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 86, in _run_code
    _run_code(code, mod_globals, init_globals,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 86, in _run_code
    _run_code(code, mod_globals, init_globals,
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/scripts/basic_sami_script.py", line 5, in <module>
    exec(code, run_globals)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/scripts/basic_sami_script.py", line 5, in <module>
    exec(code, run_globals)
    from spaxelsleuth.loaddata.sami import make_sami_metadata_df, make_sami_df, load_sami_df, load_sami_metadata_df
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/scripts/basic_sami_script.py", line 5, in <module>
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/spaxelsleuth/loaddata/sami.py", line 6, in <module>
    exec(code, run_globals)
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/scripts/basic_sami_script.py", line 5, in <module>
    from spaxelsleuth.loaddata.sami import make_sami_metadata_df, make_sami_df, load_sami_df, load_sami_metadata_df
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/spaxelsleuth/loaddata/sami.py", line 6, in <module>
    from spaxelsleuth.loaddata.sami import make_sami_metadata_df, make_sami_df, load_sami_df, load_sami_metadata_df
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/spaxelsleuth/loaddata/sami.py", line 6, in <module>
    from spaxelsleuth.loaddata.sami import make_sami_metadata_df, make_sami_df, load_sami_df, load_sami_metadata_df
    import pandas as pd
  File "/Users/u5708159/Software/python/modules/spaxelsleuth/spaxelsleuth/loaddata/sami.py", line 6, in <module>
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/site-packages/pandas/__init__.py", line 48, in <module>
    import pandas as pd
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/site-packages/pandas/__init__.py", line 48, in <module>
    import pandas as pd
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/site-packages/pandas/__init__.py", line 48, in <module>
    import pandas as pd
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/site-packages/pandas/__init__.py", line 48, in <module>
    self.wait(timeout)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/multiprocessing/pool.py", line 765, in wait
    self._event.wait(timeout)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/threading.py", line 607, in wait
    from pandas.core.api import (
    from pandas.core.api import (
    from pandas.core.api import (
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/site-packages/pandas/core/api.py", line 47, in <module>
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/site-packages/pandas/core/api.py", line 47, in <module>
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/site-packages/pandas/core/api.py", line 47, in <module>
    from pandas.core.api import (
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/site-packages/pandas/core/api.py", line 47, in <module>
    signaled = self._cond.wait(timeout)
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/threading.py", line 320, in wait
    waiter.acquire()
KeyboardInterrupt
    from pandas.core.groupby import (
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/site-packages/pandas/core/groupby/__init__.py", line 1, in <module>
    from pandas.core.groupby import (
    from pandas.core.groupby import (
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/site-packages/pandas/core/groupby/__init__.py", line 1, in <module>
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/site-packages/pandas/core/groupby/__init__.py", line 1, in <module>
    from pandas.core.groupby import (
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/site-packages/pandas/core/groupby/__init__.py", line 1, in <module>
    from pandas.core.groupby.generic import (
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/site-packages/pandas/core/groupby/generic.py", line 79, in <module>
    from pandas.core.groupby.generic import (
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/site-packages/pandas/core/groupby/generic.py", line 79, in <module>
    from pandas.core.groupby.generic import (
  File "/Users/u5708159/opt/anaconda3/envs/spaxelsleuth/lib/python3.10/site-packages/pandas/core/groupby/generic.py", line 79, in <module>

but if I copy & paste the code into ipython it works.

Steps to reproduce:

from spaxelsleuth import load_user_config
load_user_config("/Users/u5708159/Desktop/spaxelsleuth_test/.myconfig.json")
from spaxelsleuth.loaddata.sami import make_sami_metadata_df
nthreads = 4

# Create the DataFrames
make_sami_metadata_df(recompute_continuum_SNRs=True, nthreads=nthreads)

Error occurred.

hzovaro commented 1 year ago

OK, so I fixed the problem - on my Mac, the error goes away when the script is within a if __name__ == "__main__" block.

See here: https://stackoverflow.com/questions/18204782/runtimeerror-on-windows-trying-python-multiprocessing