When opening a state machine in which an empty folder resides or leftovers of a merge conflict are located the following error message occurs during loading.
Traceback (most recent call last):
File "/volume/software/common/packages/rafcon/0.13.5/source/rafcon/core/storage/storage.py", line 397, in load_state_recursively
state_info = load_data_file(path_core_data)
File "/volume/software/common/packages/rafcon/0.13.5/source/rafcon/core/storage/storage.py", line 478, in load_data_file
return storage_utils.load_objects_from_json(path_of_file)
File "/volume/software/common/packages/rafcon/0.13.5/source/rafcon/utils/storage_utils.py", line 126, in load_objects_from_json
result = json.load(f, cls=JSONObjectDecoder, substitute_modules=substitute_modules)
File "/usr/lib64/python2.7/json/__init__.py", line 291, in load
**kw)
File "/usr/lib64/python2.7/json/__init__.py", line 352, in loads
return cls(encoding=encoding, **kw).decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.7/json/decoder.py", line 380, in raw_decode
obj, end = self.scan_once(s, idx)
File "/volume/software/common/packages/python-jsonconversion/0.2.9/src/jsonconversion/decoder.py", line 64, in _dict_to_qualified_object
return cls.from_dict(dictionary)
File "/volume/software/common/packages/rafcon/0.13.5/source/rafcon/core/states/library_state.py", line 375, in from_dict
output_data_port_runtime_values, use_runtime_value_output_data_ports)
File "/volume/software/common/packages/rafcon/0.13.5/source/rafcon/core/states/library_state.py", line 98, in __init__
lib_version, state_copy = library_manager.get_library_state_copy_instance(self.lib_os_path)
File "/volume/software/common/packages/rafcon/0.13.5/source/rafcon/core/library_manager.py", line 397, in get_library_state_copy_instance
state_machine = storage.load_state_machine_from_path(lib_os_path)
File "/volume/software/common/packages/rafcon_execution_hooks_plugin/0.2.0/lib/python2.7/execution_hooks/hooks.py", line 45, in load_state_machine_from_path_with_hooks
state_machine = old_load_state_machine_from_path(*args, **kwargs)
File "/volume/software/common/packages/rafcon/0.13.5/source/rafcon/utils/timer.py", line 13, in func_wrapper
return_value = func(*args, **kwargs)
File "/volume/software/common/packages/rafcon/0.13.5/source/rafcon/core/storage/storage.py", line 301, in load_state_machine_from_path
state_machine_dict = storage_utils.load_objects_from_json(state_machine_file_path)
File "/volume/software/common/packages/rafcon/0.13.5/source/rafcon/utils/storage_utils.py", line 126, in load_objects_from_json
result = json.load(f, cls=JSONObjectDecoder, substitute_modules=substitute_modules)
File "/usr/lib64/python2.7/json/__init__.py", line 291, in load
**kw)
File "/usr/lib64/python2.7/json/__init__.py", line 352, in loads
return cls(encoding=encoding, **kw).decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.7/json/decoder.py", line 380, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 3 column 1 (char 47)
10:37:44 ERROR - gui.helpers.state_machine: Error while trying to open state machine: 'NoneType' object has no attribute 'name'
10:37:44 ERROR - gui.controllers.library_tree: Could not open library: 'NoneType' object has no attribute 'file_system_path'
We should provide a nicer error message in order to help the user to find the problem.
When opening a state machine in which an empty folder resides or leftovers of a merge conflict are located the following error message occurs during loading.
We should provide a nicer error message in order to help the user to find the problem.