question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gui wx incompatibilities with new wxpython 'phoenix'

See original GitHub issue

Hi,

running a program that uses wxpython gui with iphyton: ipython --gui wx --i my_program.py

gives an error like:

File “…/site-packages/IPython/terminal/pt_inputhooks/wx.py”, line 76, in inputhook_wx2 assert wx.Thread_IsMain() AttributeError: ‘module’ object has no attribute ‘Thread_IsMain’

On wxpython ‘phoenix’ seems that the method Thread_IsMain as been replaced by IsMainThread.

Replacing it on wx.py it seems to work.

I’m running

Python 2.7.10 IPython 5.1.0 wx.version 3.0.3.dev2553+47f1fd2 on OSX 10.11.6

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
rdemariacommented, May 29, 2018

In my case I had also a problem with a deprecation warning

IPython/terminal/pt_inputhooks/wx.py:106: wxPyDeprecationWarning: Using deprecated class EventLoop. Use GUIEventLoop instead.
  evtloop = wx.EventLoop()

It seems I fixed my setup with

cd site-packages/IPython
sed -i "s/EventLoop(/GUIEventLoop(/" lib/inputhookwx.py terminal/pt_inputhooks/wx.py
sed -i "s/app.ProcessIdle/evtloop.ProcessIdle/" lib/inputhookwx.py terminal/pt_inputhooks/wx.py
sed -i "s/Thread_IsMain/IsMainThread/" lib/inputhookwx.py terminal/pt_inputhooks/wx.py
0reactions
Carreaucommented, Nov 12, 2019

closed by #11911

Read more comments on GitHub >

github_iconTop Results From Across the Web

wx — wxPython Phoenix 4.2.0 documentation
Everything you need for building typical GUI applications is here. ... The wx.Accessible class allows wxWidgets applications, and wxWidgets itself, ...
Read more >
wxPython Project Phoenix Migration Guide
wxPython's Project Phoenix is a new incarnation of the wxPython toolkit in which everything that existed ... A compatibility alias exists so using...
Read more >
wxPython Changelog
The code will likely still compile and be compatible with Python 2.7 for some time, but no effort will be put into keeping...
Read more >
wx Functions — wxPython Phoenix 4.2.0 documentation
Exits the program immediately. This is a simple wrapper for the standard abort() function. New in version 2.9.4.
Read more >
wx.lib.softwareupdate.SoftwareUpdate
This method will check for the availability of a new update, and will ... to the GUI thread will be made to do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found