Unclear Error message when tool bin not found

14 views
Skip to first unread message

Martijn Starmans

unread,
Dec 13, 2017, 9:44:06 AM12/13/17
to Fastr Users
I accidentally revered to a wrong script in my xml file as below:

<target os="*" arch="*" interpreter="python" paths='bin/' bin="filethatdoesnotexist.py" />

The error message fastr gave me was the following:
[CRITICAL] executionscript:0107 >> Execution script encountered errors: Traceback (most recent call last):
  File "/home/mstarmans/WORCtest/lib/python2.7/site-packages/fastr/execution/executionscript.py", line 82, in execute_job
    job.execute()
  File "/home/mstarmans/WORCtest/lib/python2.7/site-packages/fastr/execution/job.py", line 723, in execute
    result = tool.execute(payload)
  File "/home/mstarmans/WORCtest/lib/python2.7/site-packages/fastr/core/tool.py", line 320, in execute
    result = self.interface.execute(target, payload)
  File "/home/mstarmans/WORCtest/lib/python2.7/site-packages/fastr/resources/plugins/interfaceplugins/fastrinterface.py", line 470, in execute
    log_data = target.run_command(command)
  File "/home/mstarmans/WORCtest/lib/python2.7/site-packages/fastr/resources/plugins/targetplugins/localbinarytarget.py", line 357, in run_command
    containing_path = next(x for x in paths if os.path.exists(os.path.join(x, command[0])))
StopIteration

It is unclear what the error is and why it occurred, hence it took me some time to figure out the problem. I think fastr should be able to catch the error when the bin file for an executable is not found.

Hakim Achterberg

unread,
Dec 14, 2017, 11:18:39 AM12/14/17
to Fastr Users
Hi Martijn,

You are completely right about this. I updated the exception so it looks like:

FastrScriptNotFoundError: Could not find the 'python' script 'addinteger.py' in paths ['/home/hachterberg/dev/fastr-develop/fastr/fastr/resources/tools/fastr/math/0.1/bin']

I think this should be a lot clearer. Is this more like what you'd expect?

Cheers,
Hakim

Martijn Starmans

unread,
Dec 14, 2017, 5:25:52 PM12/14/17
to Fastr Users
Yes, that's as clear as I could imagine, especially with the added tool name and path information. Thanks for the update.

Kind regards,

Martijn

Reply all
Reply to author
Forward
0 new messages