RIDE icon indicating copy to clipboard operation
RIDE copied to clipboard

Double quotes are added by RIDE in Execute command

Open jitenderkumaryadav opened this issue 5 years ago • 3 comments

Hi,

I am observing an issue that double quotes are added by RIDE with Execute command (SSHLibrary) and Write command keywords. When I open the code with RIDE in tabular format, all code looks fine.

SSHLibrary.Execute Command ${execCmd} -- /bin/bash -c "sudo pkill telnet"

But when I execute this code in linux using robot command, it gives me error and i saw extra double quotes are present with command (please see attached image). If i open same code in Notepad++, there also I see double quotes. If I remove it using notepad, code runs fine but if i open again in RIDE, i see, RIDE again add these double quotes.

Also this issue is seen with old code, If i write new code in RIDE then i don't see any issue w.r.t double quotes.

Please let me us know how we can resolve this issue for our legacy code.

` image

` RIDE version : v2.0b2.dev0 running on Python 3.7.3 robotframework 3.2.2 robotframework-sshlibrary 3.4.0

jitenderkumaryadav avatar Dec 15 '20 11:12 jitenderkumaryadav

First I assume you are using Windows because of Notepad++.

Also this issue is seen with old code, If i write new code in RIDE then i don't see any issue w.r.t double quotes.

So, if you create a new file in RIDE, add similar commands, and runs OK. Then close RIDE, reopen that file and will still be unchanged and correct?

But if you use an existing old file it will be modified, always.

You should compare the type of files (a new one from RIDE and old one), on Notepad++. For example on the status bar, you may have Windows (CR LF) | UTF-8 or Windows (CR LF) | ANSI. You can then try to change the Encoding to be the same as new RIDE file.

I am suspecting that the characters you see like " could have a different ASCII/UNICODE code, and because of that RIDE makes the aditional quoting.

You should also try to see if this was not introduced in recent development changes. Thanks.

HelioGuilherme66 avatar Dec 15 '20 12:12 HelioGuilherme66

Yes, I am using Windows10. Basically I writing code in windows RIDE and then copying it to linux and running TCs using robot command. New code works fine (even after reopening it)

I compared the the old code file and new code file, both has Windows (CR LF) UTF-8 encoding. In latest release notes I see below new feature introduced, that's good feature which closes brackets/quotes when we open, but not sure if this has created some problem for old code.

New Features and Fixes Highlights

Auto enclose text in {}, [], "", ''

Also I am using RIDE version v2.0b2.dev0, But on this link I can see last released version v2.0b1. I will fallback to v2.0b1 version and update you.

jitenderkumaryadav avatar Dec 15 '20 12:12 jitenderkumaryadav

v2.0b1 also has same problem. Notepad view : image

jitenderkumaryadav avatar Dec 15 '20 13:12 jitenderkumaryadav