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

strange error while loading state machine #436

Open
franzlst opened this issue Apr 17, 2020 · 3 comments
Open

strange error while loading state machine #436

franzlst opened this issue Apr 17, 2020 · 3 comments

Comments

@franzlst
Copy link
Member

Error while loading state data: Data file not found: /home_local/sebastian-brunner/robust_efficient_robot_tasks/pick_object/pick_object_HFXWXK/meta.json
Traceback (most recent call last):
File "/internal_path/common/packages/rafcon/0.12.0/source/rafcon/core/storage/storage.py", line 402, in load_state_recursively
state_info = load_data_file(path_core_data)
File "/internal_path/common/packages/rafcon/0.12.0/source/rafcon/core/storage/storage.py", line 483, in load_data_file
raise ValueError("Data file not found: {0}".format(path_of_file))
ValueError: Data file not found: /home_local/sebastian-brunner/robust_efficient_robot_tasks/pick_object/pick_object_HFXWXK/meta.json
10:03:11 ERROR - gui.helpers.state_machine: Error while trying to open state machine: 'NoneType' object has no attribute 'get_states_statistics'

Originally created by @sebastian-brunner (Sebastian.Brunner@dlr.de) at 2017-11-23 09:08:47+00:00 (moved from RMC internal repository)

@franzlst
Copy link
Member Author

Rafcon says it cannot find a meta.json, but rafcon should create one if it does not exist!?

Originally created by @sebastian-brunner (Sebastian.Brunner@dlr.de) at 2017-11-23 09:09:26+00:00 (moved from RMC internal repository)

@franzlst
Copy link
Member Author

The problem was actually that, Andi did not pushed a state machine correctly (so now the state machine runs), but still this error is misleading/strange.

Originally created by @sebastian-brunner (Sebastian.Brunner@dlr.de) at 2017-11-23 09:10:43+00:00 (moved from RMC internal repository)

@franzlst
Copy link
Member Author

The issue for the misleading error message is line 358 of storage.py:
state_machine.root_state = load_state_recursively(parent=state_machine, state_path=root_state_path)

The root state is directly asserted, without checking the return value of load_state_recursively. This is None, if the data file is not found. The exception for the missing data file is caught in load_state_recursively (line 403) and None is returned instead of a state.

So either the return value should be checked or the exception caught somewhere else.

Originally created by @franzlst (Franz.Steinmetz@dlr.de) at 2017-11-23 11:52:38+00:00 (moved from RMC internal repository)

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