I've encountered an annoying issue causing ipython to crash on tab completion. Occurs frequently and persistently, yet without any clear indication what causes it. Has anyone else encountered this? If so, is there a workaround? I'm running IPython 6.2.1 on Python 3.6.4.
Here's the error message just before the crash, right after a tab button is pressed on a class attribute >In [35]: class_instance.attri<tab>:
Exception ignored in: <bound method Image.__del__ of <tkinter.PhotoImage object at 0x7f5e4832e470>>
Traceback (most recent call last):
File "/home/foobar/.pyenv/versions/3.6.4/lib/python3.6/tkinter/__init__.py", line 3501, in __del__
self.tk.call('image', 'delete', self.name)
RuntimeError: main thread is not in main loop
In [15]: class_instance.specfiTcl_AsyncDelete: async handler deleted by the wrong thread
[1] 23894 abort (core dumped) ipython
Apologies for not being able to reliably reproduce this one - as I said earlier, it seems to occur semi-randomly at tab completion. That being said, importing matplotlib and/or running in --pylab mode might be relevant.
Updating IPython (problematic version 6.2.1, currently using 7.19.0) fixed it for me and I haven't had the issue re-appear even since (2018+).
I'm posting an answer describing what solved it for me because the question seems to generate some traffic to this day.
Related
I'm using a portable install of VS Code 1.56.1 on Windows 10. Whenever open an extension from the marketplace, I get the following error:
Error loading webview: Error: Could not register service workers: TypeError: Failed to register a ServiceWorker for scope ('vscode-webview://extensioneditor/') with script ('vscode-webview://extensioneditor/service-worker.js?platform=electron&id=extensionEditor&vscode-resource-origin=https%3A%2F%2FextensionEditor.vscode-webview-test.com'): ServiceWorker cannot be started.
Same thing happens for other things using webviews, with a slightly different path (like VS Code release notes). I'm able to install plugins and view the Feature Contributions tab, but I cannot view the Details and Changelog tabs.
Any thoughts on what could be causing this? This is on a managed machine where security settings might be changing. I'm using a portable install because my installed version stopped working out of the blue last week and this was supposed to be the workaround until that was figured out.
I was getting the same error, it looks like an issue introduced on version 1.56.0.
For me the fix was running VS Code without elevated permissions.
I always run as administrator and running without it fixed the issue for me.
I had this problem, in terminal use code . --no-sandbox
Updating python3 to the most recent version may also help.
Previously I have been using a python environment maintained by Mac ports. I had some basic scripts using PyQT, VTK, matplotlib etc. I have been able to use Paraview but seem a little heavy for my uses so I though I would try MayaVi2 (and TVTK).
I downloaded and tried to manually installing but it proved troublesome. So thought I would bite the bullet and try Canopy (academic License). Based on this VTK/Mayavi on Mac OS X which suggests all is good in the world of Qt, VTK and MayaVI, I installed 64 bit Canopy.
I am having trouble getting mayavi2 to work within the Canopy environment. It runs, but the console gets lots of errors, if I call up any dialog/setting box the "buttons" don't work properly. Here is the first error (of a couple of screen fulls) when I try to start mayavi2:
(Canopy 64bit) scratch_pad 501 $mayavi2 Traceback (most recent call
last): File
"/Applications/Canopy.app/appdata/canopy-1.0.0.1160.macosx-x86_64/Canopy.app/Contents/lib/python2.7/site-packages/pyface/ui/wx/splash_screen.py",
line 121, in _on_paint
dc = wx.PaintDC(window)
I am actually more interested in TVTK, so I tried some of the mayavi demos from the website gallery http://docs.enthought.com/mayavi/mayavi/auto/examples.html The few I tried kind-a worked, that is they display a VTK (?) window/scene, I can interact with the VTK window. All is good until I open a settings/dialogue window, and then none of dialogue window "button" work and i have to force quit. Here is the last line of error when I open the "Setting" button in the plot3D demo:
simple demo: File
"/Users/michael/Library/Enthought/Canopy_64bit/System/lib/python2.7/site-packages/wx/_core.py",
line 9162, in DestroyChildren
return core.Window_DestroyChildren(*args, **kwargs) wx._core.PyAssertionError: C++ assertion "GetEventHandler() == this"
failed at /BUILD/wxPython-src-2.9.2.4/src/common/wincmn.cpp(468) in
~wxWindowBase(): any pushed event handlers must have been removed
I even tried
ipython --gui=wx
(as suggested on the page) but in this case it crashes, no window.
Based on the error messages on the console they all appear to be wx related. It is my understanding the the Canopy environment is "self-contained", but could my old environment be somehow conflicting? How would I even test this?
Is there a way, environment variable, that mayavi2 can use Qt instead of wx? I don't use wx in any of my local python scripts, so unless it is needed in Canopy I am quite happy to disable, if that is an option.
Any ideas?
After running most of the examples in the Mayavi Gallery I have discovered that I needed to inform Traits to use Qt. This was done by setting an environment variable from within the script using a sys.environment() call. I decided to set the environment variable ETS_TOOLKIT to qt4 in my .profile as follows:**
export ETS_TOOLKIT=qt4
Mayavi2 now works as advertised!
I installed DrRacket so I can learn programming concepts using SICP. But for the past week or so, every time I launch DrRacket the console windows comes up with the following message:
fl-:contract violation
expected: flonum?
given: 0
argument position: 2nd
other arguments...:
2.0
I am not sure how I got here. I tried uninstalling and re-installing as 32-bit and 64-bit, restarting my laptop, searched forums for a possible fix. No luck. Just want to get back to my normal window where I can type in code. Thanks.
hope u found the answer. For my case, I found out that from a file I had been working on, and my computer shut down unexpectedly, there were three files associated with the initial file name - upon resuming Windows. The file extensions were .rkt (original), .bak and .1. I renamed the '.1' file as a second copy of the original and the 'contract violation' problem ended. It appeared the '.1' file was due to the laptop shutdown and was the auto-retrieve file.
I am using STS, jdk 1.6. It was working fine until now. I am getting this STS pop-up when I start it.
Java was started but returned exit code=1073807364
C:/jdk1.6.0_18/bin/javaw.exe
-Dosgi.requiredJavaVersion=1.5
...
... /15 more lines of stack on the pop-up window.
Any idea?
Found this; Looks like there is no one problem, that error code can come from a variety of events.
From what I can tell, this error code (0x40010004) arises in all sorts of situations, with (as you noted) no obvious common thread.
However this page says "0x40010004" means "the task is running"! So, I would surmise that the correct way to interpret it is as saying "this tasked has exited in a way that prevented it setting a proper exit code".
I don't know if this will help, but I would try looking in the Windows Event logs to see if the problem is being reported there.
found here: What is the cause of JVM exit code 1073807364?
From my experience, that error (described as "task is running") occurs when there is a thread in blocking mode, and the thread cannot be terminated by being interrupted (per the rules) so it lingers, causing the program to hang, and requiring a kill shot. I have experienced that error as recently as today (Sept 5, 2012), and that was the cause (because I did it deliberately).
There may be other causes, but that is one distinct possibility.
All I can suggest is updating your JDK to the latest release (1.6.0_23) and STS to the latest version (2.5.2) and seeing if the problem still persists.
When I start EasyEclipse, I get error:
JVM terminated. Exit code=127
Do you have any idea as to the possible cause for this kind of error message?
If this happen right from the start, it may be related to your eclipse.ini content.
See this one (for Eclipse 3.6 Helios),
and check the end of each lines of your eclipse.ini: there should be no extra space.
After that, it depends on:
the exact Eclipse version
the exact JVM used to launch said Eclipse
your platform (OS)
See for instance bug 174642.