Robot Framework code for imagemagick not working in windows environment

I am trying to write robot framework code with initializing imagemagick. I have already downloaded imagemagick for windows version. But everytime i run the code, it gives me an error “the system can’t find the file specified”. Following is the imagemagick part of the robot code.

*** Variables ***
${IMAGE_COMPARATOR_COMMAND} /var/run/utmp/ImageMagick-7.1.0-12/convert REFERENCE TEST -metric RMSE -compare -format “%[distortion]” info:

*** Keywords ***
Compare Images
[Arguments] ${Reference_Image_Path} ${Test_Image_Path} ${Allowed_Threshold}
${TEMP}= Replace String ${IMAGE_COMPARATOR_COMMAND} REFERENCE ${Reference_Image_Path}
${COMMAND}= Replace String ${TEMP} TEST ${Test_Image_Path}
Log Executing: ${COMMAND}
${RC} ${OUTPUT}= Run And Return Rc And Output ${COMMAND}
Log Return Code: ${RC}
Log Return Output: ${OUTPUT}
${RESULT} Evaluate ${OUTPUT} < ${Allowed_Threshold}
Should be True ${RESULT}

Compare Images C:/Users/niskande/PycharmProjects/imagingProject/venv/RobotCases/reference-screenshots/reference-1.jpg C:/Users/niskande/PycharmProjects/imagingProject/venv/RobotCases/test-screenshots/test-1.jpg 0.1

You would need to share more of the error/output which shows that path it is failing on to be able to best help. I do see you have a Linux path in the comparator command variable while running on Windows.

from the log.html files here more of the error /output
TEST Enter Application for Animation using Vulcan Build

Full Name: imagesDetect.Enter Application for Animation using Vulcan Build
Documentation: Open application for animation part of RockSolid SDK using Vulcan
Start / End / Elapsed: 20211101 18:02:47.987 / 20211101 18:02:52.788 / 00:00:04.801
Status: FAIL
Message: Evaluating expression ‘The system cannot find the path specified. < 0.1’ failed: SyntaxError: invalid syntax (, line 1)

00:00:04.625KEYWORD AppiumLibrary . Open Application http://localhost:4723/wd/hub, alias=Myapp1, platformName=Windows, platformVersion=Windows10Pro, deviceName=‘Windows’, app=C:/share/RocksolidSDK/examples/buildv/animation/Release/animation.exe

00:00:00.171KEYWORD Screenshot . Take Screenshot

00:00:00.004KEYWORD Compare Images C:/Users/niskande/PycharmProjects/imagingProject/venv/RobotCases/reference-screenshots/reference-1.jpg, C:/Users/niskande/PycharmProjects/imagingProject/venv/RobotCases/test-screenshots/test-1.jpg, 0.1

Start / End / Elapsed: 20211101 18:02:52.784 / 20211101 18:02:52.788 / 00:00:00.004

00:00:00.000KEYWORD ${TEMP} = String . Replace String ${IMAGE_COMPARATOR_COMMAND}, REFERENCE, ${Reference_Image_Path}

00:00:00.000KEYWORD ${COMMAND} = String . Replace String ${TEMP}, TEST, ${Test_Image_Path}

00:00:00.000KEYWORD BuiltIn . Log Executing: ${COMMAND}

00:00:00.004KEYWORD ${RC}, ${OUTPUT} = OperatingSystem . Run And Return Rc And Output ${COMMAND}

Documentation: Runs the given command in the system and returns the RC and output.
Start / End / Elapsed: 20211101 18:02:52.784 / 20211101 18:02:52.788 / 00:00:00.004

18:02:52.788 INFO Running command ‘/var/run/utmp/ImageMagick-7.1.0-12/convert C:/Users/niskande/PycharmProjects/imagingProject/venv/RobotCases/reference-screenshots/reference-1.jpg C:/Users/niskande/PycharmProjects/imagingProject/venv/RobotCases/test-screenshots/test-1.jpg -metric RMSE -compare -format “%[distortion]” info: 2>&1’.

18:02:52.788 INFO ${RC} = 1

18:02:52.788 INFO ${OUTPUT} = The system cannot find the path specified.

00:00:00.000KEYWORD BuiltIn . Log Return Code: ${RC}

00:00:00.000KEYWORD BuiltIn . Log Return Output: ${OUTPUT}

00:00:00.000KEYWORD ${RESULT} = BuiltIn . Evaluate ${OUTPUT} < ${Allowed_Threshold}

Documentation: Evaluates the given expression in Python and returns the result.
Start / End / Elapsed: 20211101 18:02:52.788 / 20211101 18:02:52.788 / 00:00:00.000

18:02:52.788 FAIL Evaluating expression ‘The system cannot find the path specified. < 0.1’ failed: SyntaxError: invalid syntax (, line 1)

Can you suggest to me which would be a windows path, because i thought this was windows path in the command variable ?

sorry i meant comparator command variable

This is causing the error:

18:02:52.788 FAIL Evaluating expression ‘The system cannot find the path specified. < 0.1’ failed: SyntaxError: invalid syntax (, line 1)

Coming from:
C:/Users/niskande/PycharmProjects/imagingProject/venv/RobotCases/test-screenshots/test-1.jpg -metric RMSE -compare -format “%[distortion]” info: 2>&1

Must you use the redirection >&1 ?

Maybe need some escaping?

OperatingSystem keywords should be replaced by Process (more reliable)

Thank you for your answer HelioGuilherme66. I dont need to use redirection >&1 but this is generated when i run my testcase, I am not sure how to disable it ? Can you suggest some guideline? Thank you

best regards
nafis456