spyder 2.3.0.dev5 has problems to launch an IPython console (on win32)

501 views
Skip to first unread message

stone...@gmail.com

unread,
Aug 12, 2013, 12:10:28 PM8/12/13
to spyd...@googlegroups.com
Hello,

I'm experimenting on windows vista 32bit the new spyder 2.3.0.dev5 (as a non-manager of my pc).
(via winpython 3.3.2.2, so python3.3).

Spyder fails to launch reliabily an IPython (1.0.0) console. Procedure =
- click on "Interpreters-> open an IPython Console",
- I get an opening IPython console the trick about the way to connect to an existing IPython Kernel,
- then after about 5 seconds python.exe stops with a debug message :  "Exception non gérée à 0x00000000 dans python.exe : 0xC0000005: Access violation."


Does anyone experience the same unfortunate problem ?


Nota :
- among the fails, I had two success,
- a "python.exe" process remains in the background (and seems to be the launched ipython kernel)
- I tried with mathjax installed, without more success,
- I removed Pylab activation when opening IPython console, no more success,
- on the exact same PC, I have not problems with previous spyder (2.3.0.dev3) and python1.0.0, except a kind remindermessage
   "The top-level `frontend` package has been deprecated. "

stone...@gmail.com

unread,
Aug 12, 2013, 12:53:18 PM8/12/13
to spyd...@googlegroups.com
Update :
- I can't report by "report issue" with spyder under python3.3, 
  (there is a proposed fix in Issue 1480 , http://code.google.com/p/spyderlib/issues/detail?id=1480)
- WIRED detail (is it possible ?) :
   . it seems that each time I move my winpython directory (or simply rename it), I Have one, just one, success launching IPython console.

Jim Passmore

unread,
Aug 16, 2013, 9:12:10 PM8/16/13
to spyd...@googlegroups.com
Confirming similar problem running dev5, in a freshly unzipped 32-bit WinPython 3.3.2.2, on 32-bit Win7.

Pierre Raybaut

unread,
Aug 19, 2013, 4:27:38 AM8/19/13
to spyd...@googlegroups.com
Unfortunately, I can't reproduce this bug.
 
So, considering the fact that there is no traceback (hard crash), the only way to find out where this comes from is to run Spyder from source checkout and update to older revisions until the bug disappears (or the opposite: update to the 2.3.0dev3 revision if it's working and update to newer revisions until the bug shows up).
If you need assistance, please do not hesitate to ask.
 
This may also be related to this bug report:
 
-Pierre

Pierre Raybaut

unread,
Aug 19, 2013, 12:27:51 PM8/19/13
to spyd...@googlegroups.com
After some thinking, I might have a solution to show a traceback for this crash.
Just modify the code of spyderlib\widgets\internalshell.py in your WinPython installation and replace DEBUG by True at line 168:
 
This should enable the DEBUG mode only for the internal shell which could be sufficient here.
 
-Pierre

big stone

unread,
Aug 19, 2013, 1:05:13 PM8/19/13
to spyd...@googlegroups.com
Hello Pierre,

I just tried and it changed nothing, (and the debug vs 2010 asked me a service pack, that I'm currently installing).
But first :
- I had 2 success, by starting a ipython qt console, then closing spyder (and not the ipython console)
- then it failed when I , if I did note well the chain of events, when I :
  * started again a ipython qt console,
  * then closed the ipython qt console but not spyder,
  * then retried
==> May it be a 'wrong' chain of actions that you didn't anticipate users could do ?
==> is there a magic spyder --reset or something like that that I should do or look ?




2013/8/19 Pierre Raybaut <pierre....@gmail.com>

--
You received this message because you are subscribed to a topic in the Google Groups "spyder" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/spyderlib/E4uKC3SQ3iU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to spyderlib+...@googlegroups.com.
To post to this group, send email to spyd...@googlegroups.com.
Visit this group at http://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/groups/opt_out.

big stone

unread,
Aug 19, 2013, 1:11:58 PM8/19/13
to spyd...@googlegroups.com
In between, since a few days I'm looking at py3k and windows bugs on IPython github (recently solved or not).
I thought this one was perhaps my problem : https://github.com/ipython/ipython/issues/3400


2013/8/19 big stone <stone...@gmail.com>

Pierre Raybaut

unread,
Aug 19, 2013, 1:22:14 PM8/19/13
to spyd...@googlegroups.com
I'm now able to reproduce this issue with a WinPython 3.3.2.2 distribution installed on a fresh Win7 Pro 64bit VM.
 
So far my conclusion is that python.exe crashes when calling IPythonWidget's contructor (when object is instantiated) which is not good news as this widget is from IPython.qt.console.rich_ipython_widget. In other words, I'm not close to a solution...
 
Have you tried upgrading Spyder to 2.3.0dev5 in your "old" WinPython 3.3 install? (the one that works)
 
-Pierre


2013/8/19 big stone <stone...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.

stone...@gmail.com

unread,
Aug 19, 2013, 1:33:54 PM8/19/13
to spyd...@googlegroups.com
I would rather consider a perfectly reproducible bug very good news.
Wouldn't it be possible to escaladate the bug to ipython team ?

They are already doing a change in "qt.console.rich_ipython_widget", related to old "qt console" / "py3k" bugs.
(https://github.com/ipython/ipython/pull/4054/files)

Pierre Raybaut

unread,
Aug 19, 2013, 3:20:13 PM8/19/13
to spyd...@googlegroups.com
You're right, being able to reproduce the bug is a good thing but in that case, the bug is not 100% reproducible. Sometimes it crashes, sometimes not. And I don't understand why.
 
Anyway, I was able to find a way to prevent the application from crashing when an IPython console is opened by commenting out lines 354-376 in IPython\qt\console\console_widget.py:
 
        self.increase_font_size = QtGui.QAction("Bigger Font",

                self,

                shortcut=QtGui.QKeySequence.ZoomIn,

                shortcutContext=QtCore.Qt.WidgetWithChildrenShortcut,

                statusTip="Increase the font size by one point",

                triggered=self._increase_font_size)

        self.addAction(self.increase_font_size)


        self.decrease_font_size = QtGui.QAction("Smaller Font",

                self,

                shortcut=QtGui.QKeySequence.ZoomOut,

                shortcutContext=QtCore.Qt.WidgetWithChildrenShortcut,

                statusTip="Decrease the font size by one point",

                triggered=self._decrease_font_size)

        self.addAction(self.decrease_font_size)


        self.reset_font_size = QtGui.QAction("Normal Font",

                self,

                shortcut="Ctrl+0",

                shortcutContext=QtCore.Qt.WidgetWithChildrenShortcut,

                statusTip="Restore the Normal font size",

                triggered=self.reset_font)

        self.addAction(self.reset_font_size)


Could you please try and comment those lines on your side to see if it has the same effect?

 

-Pierre



2013/8/19 <stone...@gmail.com>

Pierre Raybaut

unread,
Aug 19, 2013, 3:52:24 PM8/19/13
to spyd...@googlegroups.com
Ok, I think I've narrowed it down.
This bug may be a shortcut conflict in Qt introduced with the following revision:
 
This is very surprising but it's apparently causing a hard crash.
 
So, to confirm that this is it, could you please try and comment lines 631-634 in spyderlib\widgets\editor.py:
 
        self.zoominsc = newsc(QKeySequence.ZoomIn,
                              lambda: self.emit(SIGNAL('zoom_in()')))
        self.zoomoutsc = newsc(QKeySequence.ZoomOut,
                               lambda: self.emit(SIGNAL('zoom_out()')))
(and uncomment the lines in IPython\qt\console\console_widget.py, of course)
 
Thanks,
-Pierre


2013/8/19 Pierre Raybaut <pierre....@gmail.com>

big stone

unread,
Aug 19, 2013, 3:54:21 PM8/19/13
to spyd...@googlegroups.com
Hi,

Here also, It seems to be much more stable.
I can't trigger the bug, even trying more dangerous actions like opening several qt consoles.





2013/8/19 Pierre Raybaut <pierre....@gmail.com>

big stone

unread,
Aug 19, 2013, 3:55:48 PM8/19/13
to spyd...@googlegroups.com
so I restore first the original "consol_widget.py", right ?


2013/8/19 big stone <stone...@gmail.com>

stone...@gmail.com

unread,
Aug 19, 2013, 4:06:02 PM8/19/13
to spyd...@googlegroups.com
ok,

so un-commenting previous change + trying spyder +ipython qt console
==> fail (expected, nearly hoped).

but, commenting the 4 lines indicated and trying again fails also just after
(and yes, i killed the python process in the background before)
==> unless I did something wrong, i cannot confirm the last move as a success.

Pierre Raybaut

unread,
Aug 19, 2013, 4:37:58 PM8/19/13
to spyd...@googlegroups.com
That's a nasty one, for sure. I was sure that it was the revision which caused this issue... but shortly after I wrote my last message, I realized that it was still crashing (I just had the "chance" to run it three times without a single crash...).
 
However, do you confirm that commenting lines 354-376 in IPython\qt\console\console_widget.py is really working (I mean, 100%)?
 
-Pierre


2013/8/19 <stone...@gmail.com>

stone...@gmail.com

unread,
Aug 19, 2013, 4:42:24 PM8/19/13
to spyd...@googlegroups.com
Yes , with the previous move, I couldn't trigger the bug.

Excuse me for this perhaps stupid remark : if the bug is triggered by a too close succession of zoom_in + zoom_out on a slow machine, like a VM or an old Vista beast, could a 'delay' or a 'wait of completion' do the trick also ?

stone...@gmail.com

unread,
Aug 19, 2013, 4:49:08 PM8/19/13
to spyd...@googlegroups.com
Hum, 100% of confirmation after 10 tries is perhaps an overstatement.
Even the less serious survey company would not dare do that.

Pierre Raybaut

unread,
Aug 19, 2013, 5:08:47 PM8/19/13
to spyd...@googlegroups.com
Ok.

Now, let's say you go back to the original IPython file contents: the bug should be triggered each time you try to open an IPython console.
Is removing all Spyder settings has any effect on this situation? (doing a reset: `spyder --reset`)
(BTW, to test all this, you may open the WinPython command prompt and type `spyder --show-console`)
 
-Pierre


2013/8/19 <stone...@gmail.com>

stone...@gmail.com

unread,
Aug 19, 2013, 5:19:58 PM8/19/13
to spyd...@googlegroups.com
Ok
* launching winpython command prompt
* spyder --reset
* spyder --show-console
* asking for a IPython qt console inside Ipython ...
==> it goes a little further, opening a qt console sub-window + displaying the initial blabla "to connect to another client to this kerrnel,..."
but then it fails before proposing the first "[1]:"  prompt.

Sorry I can't do further test tonight, my eyes are closing.

Sheers,

stone...@gmail.com

unread,
Aug 19, 2013, 5:24:35 PM8/19/13
to spyd...@googlegroups.com
Closing the dos window, I see there was a trace.
*****************************************************
C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2>spyder --
show-console
Traceback (most recent call last):
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\widgets\status.py", line 80, in update_label
    self.label.setText('%d %%' % self.get_value())
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\widgets\status.py", line 93, in get_value
    return memory_usage()
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\utils\system.py", line 20, in windows_memory_usage
    class MemoryStatus(wintypes.Structure):
AttributeError: 'module' object has no attribute 'Structure'
C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\lib\site-
packages\OpenGL\Tk\__init__.py:110: DeprecationWarning: The 'warn' method is dep
recated, use 'warning' instead
  log.warn( 'Expected Tk Togl installation in %s', TOGL_DLL_PATH )
Expected Tk Togl installation in C:\Users\parent\Desktop\winpython\WinPython-32b
it-3.3.2.2\python-3.3.2\lib\site-packages\OpenGL\Tk\togl-win32
Traceback (most recent call last):
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\widgets\status.py", line 80, in update_label
    self.label.setText('%d %%' % self.get_value())
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\widgets\status.py", line 93, in get_value
    return memory_usage()
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\utils\system.py", line 20, in windows_memory_usage
    class MemoryStatus(wintypes.Structure):
AttributeError: 'module' object has no attribute 'Structure'
Traceback (most recent call last):
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\widgets\status.py", line 80, in update_label
    self.label.setText('%d %%' % self.get_value())
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\widgets\status.py", line 93, in get_value
    return memory_usage()
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\utils\system.py", line 20, in windows_memory_usage
    class MemoryStatus(wintypes.Structure):
AttributeError: 'module' object has no attribute 'Structure'
Traceback (most recent call last):
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\widgets\status.py", line 80, in update_label
    self.label.setText('%d %%' % self.get_value())
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\widgets\status.py", line 93, in get_value
    return memory_usage()
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\utils\system.py", line 20, in windows_memory_usage
    class MemoryStatus(wintypes.Structure):
AttributeError: 'module' object has no attribute 'Structure'
Traceback (most recent call last):
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\widgets\status.py", line 80, in update_label
    self.label.setText('%d %%' % self.get_value())
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\widgets\status.py", line 93, in get_value
    return memory_usage()
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\utils\system.py", line 20, in windows_memory_usage
    class MemoryStatus(wintypes.Structure):
AttributeError: 'module' object has no attribute 'Structure'
Traceback (most recent call last):
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\widgets\status.py", line 80, in update_label
    self.label.setText('%d %%' % self.get_value())
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\widgets\status.py", line 93, in get_value
    return memory_usage()
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\l
ib\site-packages\spyderlib\utils\system.py", line 20, in windows_memory_usage
    class MemoryStatus(wintypes.Structure):
AttributeError: 'module' object has no attribute 'Structure'

C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2>

stone...@gmail.com

unread,
Aug 20, 2013, 12:07:26 PM8/20/13
to spyd...@googlegroups.com
Today, after a full restart :
spyder --reset
spyder --show-console
==> gives the same trace errors, but qt console starts.

********************************
When I close the ipython window, it gives me a complementary end

Exception in thread Thread-4:

Traceback (most recent call last):
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\lib\threading.py", line 637, in _bootstrap_inner
    self.run()
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\lib\threading.py", line 594, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\lib\site-packages\spyderlib\spyder.py", line 1903, in start_open_files_server
    req, dummy = self.open_files_server.accept()
  File "C:\Users\parent\Desktop\winpython\WinPython-32bit-3.3.2.2\python-3.3.2\lib\socket.py", line 135, in accept
    fd, addr = self._accept()
OSError: [WinError 10038] Une opération a été tentée sur autre chose qu'un socket


*****************************
If I retry a second time again, this time I have no particular end message when closing qt console,
at the thrid try, qt console fails to start.

*******************************
Rebooting, I retried the same procedure, But :
- I didn't get the complementary message at first success (and closing of qt console),
- and I failed at second try instead of 3rd try.

stone...@gmail.com

unread,
Aug 22, 2013, 1:28:26 PM8/22/13
to spyd...@googlegroups.com
Hi,

With a fresh installation with WinPython-32bit-3.3.2.3.exe

* I fail at this first sequence :
- install+open/close notebook+open spyder+create qt console,+delete (click on X +'ok') qt console + create qt console,
   ==> it failed once, the same way as last version.
   ==> nota : the pc drive was very busy also at that moment (doing windows vista housekeeping).

* Then, I can't make it fail anymore.
  ==>  This new version seems 99% stable now.

Sheers


Le lundi 12 août 2013 18:10:28 UTC+2, stone...@gmail.com a écrit :
Reply all
Reply to author
Forward
0 new messages