Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

symlinking a folder into a library doesn't seem to work #837

Open
SebastianRiedel opened this issue May 15, 2020 · 1 comment
Open

symlinking a folder into a library doesn't seem to work #837

SebastianRiedel opened this issue May 15, 2020 · 1 comment

Comments

@SebastianRiedel
Copy link
Contributor

I have a setting in which I'd like to symlink a folder containing rafcon libraries into a "bigger" rafcon library. However, this setting seems to crash rafcon on startup.

Conceptually it looks like this:

my_rafcon_library/
├── A
│   └── blabla
│       ├── blabla_QHCMXS
│       │   ├── core_data.json
│       │   └── meta_data.json
│       ├── meta_data.json
│       └── statemachine.json
└── B -> /home/sr/some/folder/B

Before starting rafcon I export RAFCON_LIBRARY_PATH=.../somewhere/my_rafcon_library. The error I get is:

Traceback (most recent call last):
  File "/home/sr/.conan/data/rafcon/0.14.1/ar/stable/package/9bfdcfa2bb925892ecf42e2a018a3f3529826676/bin/rafcon", line 11, in <module>
    sys.exit(main())
  File "/home/sr/.conan/data/rafcon/0.14.1/ar/stable/package/9bfdcfa2bb925892ecf42e2a018a3f3529826676/lib/python2.7/site-packages/rafcon/gui/start.py", line 356, in main
    setup_mvc_configuration(user_input.config_path, user_input.gui_config_path, user_input.gui_config_path)
  File "/home/sr/.conan/data/rafcon/0.14.1/ar/stable/package/9bfdcfa2bb925892ecf42e2a018a3f3529826676/lib/python2.7/site-packages/rafcon/gui/start.py", line 202, in setup_mvc_configuration
    setup_configuration(core_config_path)
  File "/home/sr/.conan/data/rafcon/0.14.1/ar/stable/package/9bfdcfa2bb925892ecf42e2a018a3f3529826676/lib/python2.7/site-packages/rafcon/core/start.py", line 146, in setup_configuration
    core_singletons.library_manager.initialize()
  File "/home/sr/.conan/data/rafcon/0.14.1/ar/stable/package/9bfdcfa2bb925892ecf42e2a018a3f3529826676/lib/python2.7/site-packages/rafcon/core/library_manager.py", line 122, in initialize
    self._load_libraries_from_root_path(library_root_key, library_root_path)
  File "/home/sr/.conan/data/rafcon/0.14.1/ar/stable/package/9bfdcfa2bb925892ecf42e2a018a3f3529826676/lib/python2.7/site-packages/rafcon/core/library_manager.py", line 149, in _load_libraries_from_root_path
    self._load_nested_libraries(library_root_path, self._libraries[library_root_key])
  File "/home/sr/.conan/data/rafcon/0.14.1/ar/stable/package/9bfdcfa2bb925892ecf42e2a018a3f3529826676/lib/python2.7/site-packages/rafcon/core/library_manager.py", line 181, in _load_nested_libraries
    self._load_nested_libraries(full_library_path, target_dict[library_name])
  File "/home/sr/.conan/data/rafcon/0.14.1/ar/stable/package/9bfdcfa2bb925892ecf42e2a018a3f3529826676/lib/python2.7/site-packages/rafcon/core/library_manager.py", line 173, in _load_nested_libraries
    library_folder_path, library_name = self.check_clean_path_of_library(library_path, library_name)
  File "/home/sr/.conan/data/rafcon/0.14.1/ar/stable/package/9bfdcfa2bb925892ecf42e2a018a3f3529826676/lib/python2.7/site-packages/rafcon/core/library_manager.py", line 153, in check_clean_path_of_library
    library_root_path = self._library_root_paths[self._get_library_root_key_for_os_path(folder_path)]
KeyError: None

If I substitute the B-symlink with a physical copy of /home/sr/some/folder/B, it loads.

Not super-critical, but I had/have a use case for this.

@sebastian-brunner
Copy link
Member

sebastian-brunner commented May 20, 2020

Thx for reporting, in general symlink shouldn't be a problem, so this is a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants