Skip to content

Can't open settings about Tools-preferences-Grid Editor /Text Editor/Test Runner on python2.7 #2111

Closed

Description

@tiangaao

Python version:2.7.12
Ride version:1.7.4
pip list:
Package Version


certifi 2019.6.16
chardet 3.0.4
future 0.17.1
idna 2.8
iso8601 0.1.12
numpy 1.16.4
Pillow 6.1.0
pip 19.2.3
Pygments 2.4.2
PyPubSub 3.3.0
pywin32 224
PyYAML 5.1.1
requests 2.22.0
retrying 1.3.3
robotframework 3.1.2
robotframework-autoitlibrary 1.2.4
robotframework-databaselibrary 1.2.4
robotframework-ride 1.7.4
robotframework-selenium2library 3.0.0
robotframework-seleniumlibrary 3.3.1
robotframeworklexer 1.1
selenium 3.141.0
serial 0.0.97
setuptools 20.10.1
six 1.12.0
urllib3 1.25.3
wxPython 4.0.7.post2

Ride Log:

20200108 16:05:50.569 [INFO]: Found Robot Framework version 3.1.2 from C:\Python27\lib\site-packages\robot.

20200108 16:05:50.569 [ERROR]: Error in listener: write() argument 1 must be unicode, not str
While handling <robotide.publish.messages2.RideLogMessage object at 0x000000000568E668>

Traceback (most recent call last):
write() argument 1 must be unicode, not str
File "C:\Python27\lib\site-packages\robotide\publish\publisher.py", line 103, in call
self.listener(data)
File "C:\Python27\lib\site-packages\robotide\log\log.py", line 91, in _log_message
self._logfile.write(_message_to_string(log_event))

20200108 16:05:50.569 [INFO]: Started RIDE 1.7.4 using python version 2.7.12 with wx version 4.0.7.post2 in win32.

20200108 16:05:50.569 [ERROR]: Error in listener: write() argument 1 must be unicode, not str
While handling <robotide.publish.messages2.RideLogMessage object at 0x000000000614C3C8>

Traceback (most recent call last):
write() argument 1 must be unicode, not str
File "C:\Python27\lib\site-packages\robotide\publish\publisher.py", line 103, in call
self.listener(data)
File "C:\Python27\lib\site-packages\robotide\log\log.py", line 91, in _log_message
self._logfile.write(_message_to_string(log_event))

Activity

  1. HelioGuilherme66 commented on Jan 8, 2020

    @HelioGuilherme66
    Member

    @tiangaao Is that Windows 7?
    Was this an upgrade from previous version?
    Did the Run test worked?
    Possible way to fix, with RIDE closed:
    Goto %APPDATA%\Robotframework\ride and make a backup copy of file settings.cfg (or rename it to a safe name). Then delete the file settings.cfg and start RIDE. It will create settings.cfg with defaults. It should be possible to go to Preferences and change settings.

  2. added
    os: windows
    pending
    on Jan 8, 2020
  3. tiangaao commented on Jan 9, 2020

    @tiangaao
    Author

    @HelioGuilherme66
    Yes, Windows 7 x64, I use the command "pip uninstall robotframe-ride" to delete the old version, and then "pip install robotframe-ride ". I can run my test case successfully, only can't open these settings.

    I use your method, and then the settings about Grid Editor can opened, and the Text Editor/Test Runner still can't opened. But when I open my cases, all these three settings still can't opened.

  4. HelioGuilherme66 commented on Jan 9, 2020

    @HelioGuilherme66
    Member

    @tiangaao I was suspecting of bad Font Face configuration, but it is not conclusive. What you can try is to start RIDE from a command window with: python -m robotide.__init__
    That way any python errors would be better seen in output.
    Another thing you can do is to install Python 3.7 and then wxPython and RIDE, and use that one.
    Good luck.

  5. tiangaao commented on Jan 10, 2020

    @tiangaao
    Author

    @HelioGuilherme66
    the output about "python -m robotide.init"
    Traceback (most recent call last):
    File "C:\Python27\lib\site-packages\robotide\preferences\editor.py", line 125,in OnTreeSelection
    panel = self._container.AddPanel(instance_or_class, self._settings)
    File "C:\Python27\lib\site-packages\robotide\preferences\editor.py", line 213,in AddPanel
    panel = panel_class(parent=self.panels_container, settings=settings)
    File "C:\Python27\lib\site-packages\robotide\preferences\editors.py", line 187, in init
    settings[self.name], *args, **kwargs)
    File "C:\Python27\lib\site-packages\robotide\preferences\editors.py", line 68, in init
    font_editor = self._create_font_editor()
    File "C:\Python27\lib\site-packages\robotide\preferences\editors.py", line 117, in _create_font_editor
    sizer.AddMany([s.label(self), s.chooser(self)])
    File "C:\Python27\lib\site-packages\robotide\preferences\widgets.py", line 158, in chooser
    key=self._setting_name, choices=self._choices)
    File "C:\Python27\lib\site-packages\robotide\preferences\widgets.py", line 53, in init
    size=self._get_size(choices),
    File "C:\Python27\lib\site-packages\robotide\preferences\widgets.py", line 67, in _get_size
    return wx.Size(max(max(len(str(s)) for s in choices)*fact, 72), 20)
    File "C:\Python27\lib\site-packages\robotide\preferences\widgets.py", line 67, in
    return wx.Size(max(max(len(str(s)) for s in choices)*fact, 72), 20)
    UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)
    Traceback (most recent call last):
    File "C:\Python27\lib\site-packages\robotide\preferences\editor.py", line 125, in OnTreeSelection
    panel = self._container.AddPanel(instance_or_class, self._settings)
    File "C:\Python27\lib\site-packages\robotide\preferences\editor.py", line 213, in AddPanel
    panel = panel_class(parent=self.panels_container, settings=settings)
    File "C:\Python27\lib\site-packages\robotide\preferences\editors.py", line 131, in init
    settings[self.name], *args, **kwargs)
    File "C:\Python27\lib\site-packages\robotide\preferences\editors.py", line 68, in init
    font_editor = self._create_font_editor()
    File "C:\Python27\lib\site-packages\robotide\preferences\editors.py", line 117, in _create_font_editor
    sizer.AddMany([s.label(self), s.chooser(self)])
    File "C:\Python27\lib\site-packages\robotide\preferences\widgets.py", line 158, in chooser
    key=self._setting_name, choices=self._choices)
    File "C:\Python27\lib\site-packages\robotide\preferences\widgets.py", line 53, in init
    size=self._get_size(choices),
    File "C:\Python27\lib\site-packages\robotide\preferences\widgets.py", line 67, in _get_size
    return wx.Size(max(max(len(str(s)) for s in choices)*fact, 72), 20)
    File "C:\Python27\lib\site-packages\robotide\preferences\widgets.py", line 67, in
    return wx.Size(max(max(len(str(s)) for s in choices)*fact, 72), 20)
    UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)
    Traceback (most recent call last):
    File "C:\Python27\lib\site-packages\robotide\preferences\editor.py", line 125, in OnTreeSelection
    panel = self._container.AddPanel(instance_or_class, self._settings)
    File "C:\Python27\lib\site-packages\robotide\preferences\editor.py", line 213, in AddPanel
    panel = panel_class(parent=self.panels_container, settings=settings)
    File "C:\Python27\lib\site-packages\robotide\preferences\editors.py", line 277, in init
    settings['Plugins'][self.name], *args, **kwargs)
    File "C:\Python27\lib\site-packages\robotide\preferences\editors.py", line 68, in init
    font_editor = self._create_font_editor()
    File "C:\Python27\lib\site-packages\robotide\preferences\editors.py", line 117, in _create_font_editor
    sizer.AddMany([s.label(self), s.chooser(self)])
    File "C:\Python27\lib\site-packages\robotide\preferences\widgets.py", line 158, in chooser
    key=self._setting_name, choices=self._choices)
    File "C:\Python27\lib\site-packages\robotide\preferences\widgets.py", line 53, in init
    size=self._get_size(choices),
    File "C:\Python27\lib\site-packages\robotide\preferences\widgets.py", line 67, in _get_size
    return wx.Size(max(max(len(str(s)) for s in choices)*fact, 72), 20)
    File "C:\Python27\lib\site-packages\robotide\preferences\widgets.py", line 67, in
    return wx.Size(max(max(len(str(s)) for s in choices)*fact, 72), 20)
    UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)

  6. added
    bug
    prio-medium
    and removed
    pending
    on Jan 11, 2020
  7. added this to the v1.7.4.1 milestone on Jan 11, 2020
  8. HelioGuilherme66 commented on Jan 11, 2020

    @HelioGuilherme66
    Member

    @tiangaao You can now test my fix by installing the development version with:

    pip install -U https://github.com/robotframework/RIDE/archive/master.zip
    

    I did not manage to reproduce, but I suspect that is the name of fonts that is causing the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugos: windowsprio-medium

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions