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

cannot delete argument for kw #28

Closed
2Eagle2 opened this issue Oct 15, 2018 · 3 comments
Closed

cannot delete argument for kw #28

2Eagle2 opened this issue Oct 15, 2018 · 3 comments
Labels

Comments

@2Eagle2
Copy link

2Eagle2 commented Oct 15, 2018

When having keyword with multiple parameters and try to delete one argument, the argument is not deleted.
When try to delete argument with backspace, the argument is replaced by BS symbol.
when deleting it with delete button the argument is not deleted

When trying to delete it manually in text edit tab, when press an apply button an exception occur:

Traceback (most recent call last):
File "C:\Python\Python36\lib\site-packages\robotide\editor\texteditor.py", line 298, in
ButtonWithHandler(self, 'Apply Changes', handler=lambda e: self.save()))
File "C:\Python\Python36\lib\site-packages\robotide\editor\texteditor.py", line 430, in save
self._editor.utf8_text):
File "C:\Python\Python36\lib\site-packages\robotide\editor\texteditor.py", line 179, in validate_and_update
if not self._sanity_check(data, m_text):
File "C:\Python\Python36\lib\site-packages\robotide\editor\texteditor.py", line 190, in _sanity_check
formatted_text = data.format_text(text)
File "C:\Python\Python36\lib\site-packages\robotide\editor\texteditor.py", line 245, in format_text
return self._txt_data(self._create_target_from(text))
File "C:\Python\Python36\lib\site-packages\robotide\editor\texteditor.py", line 241, in _create_target_from
FromStringIOPopulator(target).populate(src)
File "C:\Python\Python36\lib\site-packages\robotide\editor\texteditor.py", line 530, in populate
robotapi.TxtReader().read(content, self)
File "C:\Python\Python36\lib\site-packages\robotide\lib\robot\parsing\tsvreader.py", line 26, in read
for row in Utf8Reader(tsvfile).readlines():
File "C:\Python\Python36\lib\site-packages\robotide\lib\robot\utils\utf8reader.py", line 47, in readlines
yield self._decode(line, remove_bom=index == 0)
File "C:\Python\Python36\lib\site-packages\robotide\lib\robot\utils\utf8reader.py", line 50, in _decode
if remove_bom and content.startswith(BOM_UTF8):
TypeError: startswith first arg must be str or a tuple of str, not bytes

@2Eagle2
Copy link
Author

2Eagle2 commented Oct 15, 2018

Debug.zip

The bug can be easily reproduced on attached test case by simply adding or removing arguments

@2Eagle2 2Eagle2 closed this as completed Oct 15, 2018
@2Eagle2
Copy link
Author

2Eagle2 commented Oct 15, 2018

misclicked close issue

@HelioGuilherme66
Copy link
Owner

Thanks for the bug and the fix.
(I did just small adjustment to the import)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants