【问题标题】:Running ride.py shows error "wxPython with ansi encoding is not supported"运行ride.py 显示错误“不支持带有ansi 编码的wxPython”
【发布时间】:2013-05-13 16:12:24
【问题描述】:

在执行名为 ride.py 的文件时,我收到以下错误消息:

不支持ansi编码的wxPython 需要安装 wxPython 2.8 工具包,支持 unicode 以运行 RIDE。看 http://wxpython.org 了解更多信息。

配置:

  • 我的操作系统是 CentOS6
  • Python 版本为 2.7
  • wxWidget 版本为 2.8.12
  • Ride 版本为 robotsframework-ride-1.1
  • robotframework 版本为 2.7.7

该游乐设施似乎不支持 ansi 模式。 但是 xw.platformINfo 包含“ansi”,如下所示。

>>> print wx.PlatformInfo
('__WXGTK__', 'wxGTK', 'ansi', 'gtk2', 'wx-assertions-off', 'SWIG-1.3.29')

但是作为源代码的 wxPython 是在 OS 上编译的。所以我不知道如何设置“ansi”模式。 编译步骤如下:

   $../configure --prefix=/opt/wx/2.8 \
             --with-gtk \
             --with-gnomeprint \
             --with-opengl \
             --enable-debug \
             --enable-debug_gdb \
             --enable-geometry \
             --enable-graphics_ctx \
             --enable-sound --with-sdl \
             --enable-mediactrl \
             --enable-display \
             --with-libjpeg=builtin \
             --with-libpng=builtin \
             --with-libtiff=builtin \
             --with-zlib=builtin ; 
   $vi .make 
      (content of .make file)
      make $* \
           && make -C contrib/src/gizmos $* \
           && make -C contrib/src/stc $* 
   $.make
   $.make install 

   $cd wxPython
   $python setup.py build_ext --inplace --debug  WX_CONFIG=/opt/wx/2.8/bin/wx-config BUILD_GLCANVAS=0 
   $python setup.py install WX_CONFIG=/opt/wx/2.8/bin/wx-config

感谢您的 cmets。


我可以更改 wx.PlatformInfo 的值吗?????

【问题讨论】:

    标签: wxpython wxwidgets robotframework


    【解决方案1】:

    看起来您已经安装了 wxPython 的 ANSI 版本,并从 Installation Instructions 安装了 robotframework-ride(他们的重点):

    RIDE 的 GUI 是使用 wxPython 工具包实现的。版本 2.8.6 或 需要具有 Unicode 支持 的更新版本。 ANSI 版本不是 支持。

    因此,在 wxPython 支持 Unicode 后,您需要重新安装它。根据build guide,您的配置应包含--enable-unicode,如下所示:

    ../configure --prefix=/opt/wx/2.8 \
                 --with-gtk \
                 --with-gnomeprint \
                 --with-opengl \
                 --enable-debug \
                 --enable-debug_gdb \
                 --enable-geometry \
                 --enable-graphics_ctx \
                 --enable-sound --with-sdl \
                 --enable-mediactrl \
                 --enable-display \
                 --enable-unicode \
                 --with-libjpeg=builtin \
                 --with-libpng=builtin \
                 --with-libtiff=builtin \
                 --with-zlib=builtin \
    

    【讨论】:

      【解决方案2】:

      在配置命令中添加--enable-unicode。

      【讨论】:

        【解决方案3】:

        在 linux(至少 RHEL 和 centos)上使用 Ride 时要注意的另一点是 python 版本。根据我的经验,骑行不适用于 python 2.7。你必须使用 python 2.6。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2021-01-07
          • 2018-10-13
          • 2014-05-28
          • 1970-01-01
          相关资源
          最近更新 更多