BerkeleyAutomation / autolab_core

Core utilities for Berkeley AutoLab.
https://berkeleyautomation.github.io/autolab_core
Apache License 2.0
80 stars 39 forks source link

Segmentation fault (core dumped) occurred when mayavi and autolab_core are imported in the same time #39

Closed zhaoguangbao closed 2 years ago

zhaoguangbao commented 3 years ago
from mayavi import mlab
from autolab_core import YamlConfig
import os

if __name__ == '__main__':
    home_dir = os.environ["HOME"]
    print(home_dir)
    yaml_config = YamlConfig(filename)
    print(yaml_config[keyname])

As above, the "bind: Invalid command enable-meta-key" occurred in pycharm, and the "segmentation dump" occurred during the execution of the script.

from autolab_core import YamlConfig
from mayavi import mlab

Swap the order and the error does not occur

Thanks!

mjd3 commented 3 years ago

Hi @zhaoguangbao,

I am unable to reproduce this error using the slightly modified script here:

from mayavi import mlab
from autolab_core import YamlConfig
import os

if __name__ == '__main__':
    home_dir = os.environ["HOME"]
    save_path = os.path.join(home_dir, "test.yaml") 
    cfg = YamlConfig()
    cfg["key"] = "value"
    cfg.save(save_path)
    yaml_config = YamlConfig(save_path)
    print(yaml_config["key"])

What OS are you running on and what is your python version?

mjd3 commented 2 years ago

Closing for inactivity, please feel free to reopen!