[Text Edit] Saving changes in "Text Edit" module are automatically reverted
Closed this issue · 9 comments
Windows 11
Python 3.11.9
wxPython 4.2.1
robotframework-ride 2.1.dev73
@Roboteus Please be more detailed on the workflow you performed.
Maybe we could talk on Slack, before opening so many Issues?
installing new wxPython didn't help
pip install -i https://test.pypi.org/simple/ wxPython==4.2.2a1
installing RIDE version v2.1dev75 didn't help
@HelioGuilherme66 I've got similar issue when using Text Editor
.
Environment:
Python 3.10.12
wxPython 4.2.1
robotframework 6.0.2
robotframework-ride 2.1.dev78
Ubuntu 22.04.4 LTS
LXDE
Steps:
- Create
New Project
- Create
New Test Case
and put something into Grid and save
- Switch to
Text Edit
and write something new and/or edit existing lines.
4.a Perform save operation (CTRL+S
)
4.b ORsave icon
orFile menu->Save
*** Test Cases ***
Sample Project
Comment Sample comment
Comment Sample comment 2
Hi Helio,
I've upgraded to the latest RIDE v2.1.b1. However, my environment is still working with wxPython 4.2.1.
Repeated my steps (manually typed the text) and clicked Apply Changes
button and noticed a following traceback print on the console:
Traceback (most recent call last):
File "/home/venv/repos/RIDE_dev/src/robotide/editor/texteditor.py", line 970, in
handler=lambda e: self.plugin._apply_txt_changes_to_model())
File "/home/venv/repos/RIDE_dev/src/robotide/editor/texteditor.py", line 597, in _apply_txt_changes_to_model
if not self._editor.content_save(lang=self._doc_language):
File "/home/venv/repos/RIDE_dev/src/robotide/editor/texteditor.py", line 1388, in content_save
if not self._data_validator.validate_and_update(self._data, self.source_editor.utf8_text,
File "/home/venv/repos/RIDE_dev/src/robotide/editor/texteditor.py", line 689, in validate_and_update
result = self._sanity_check(data, m_text) # First check
File "/home/venv/repos/RIDE_dev/src/robotide/editor/texteditor.py", line 738, in _sanity_check
if token.type == token.INVALID_HEADER:
AttributeError: 'Token' object has no attribute 'INVALID_HEADER'
The revert action occur only after the save.
@ZDabrowski This message, AttributeError: 'Token' object has no attribute 'INVALID_HEADER'
may be related with your version of Robot Framework, lower than 7.0.
I did observe this strange behavior in a NEW install of RIDE, in Windows, so it may not be exclusive to Linux.
Maybe after a restart of RIDE, the problem is gone. (in the Windows case).
(If needed reopen)
Closing because we have now a new release v2.1, and users should try it.
Use the command:
pip install -U robotframework-ride
Or from RIDE, Help->Check for Upgrade.
started to work at:
Python 3.12.7
wxPython 4.2.2
RIDE 2.1.1
Windows11