VS Code cursor bug in terminal - python

Cursor repeating and remaining in the Integrated Terminal in VS Code
I encountered this bug in my terminal while doing Python tutorial so downloaded and reinstalled the same version (latest version of VS Code) but the problem persists. I looked about for some answers but only found this tutorial which is not related.
Anyway, I reinstalled the software only to find the bug was still present. The code runs but the cursor is an obstruction. From time to time I may type in the wrong execution so it's a bit of a bother.

Turned off GPU acceleration in the Terminal of VS Code. That has seemed to resolve the matter; No longer cursor trails.
Settings > Type 'Render' > Go to
Terminal › Integrated: Gpu Acceleration.
Setting controls whether the terminal will leverage the GPU to do its rendering.
Switch 'off' in dropdown menu

Related

Issue with new isort extension installed as from VS-Code Update October 2022 (version 1.73)

I'm using VS-Code version 1.73.1, with MS Python extension v2022.18.2, on Windows 10 Pro, Build 10.0.19045. After installing the October 2022 update of VS Code, when writing Python code I noticed nagging error diagnostics being issued by the isort extension about the import order of modules. Previously, I had never encountered such diagnostics.
I traced this behaviour back to the VS Code release notes for the Update October 2022. These announce the migration of VS Code to a new stand-alone isort extension, instead of the isort support built into the Python extension, by automatically installing it alongside the Python extension. When opening a file in which the imports do not follow isort standards, the extension is intended to issue an error diagnostic and display a Code Action to fix the import order.
Whilst the extension seems to work as intended, I found the issues described below:
1. Even after having executed the Code Action to fix the import order, a 'light-bulb' with the same error diagnostic and Code Action again pops up on moving the cursor to a new line of code.
2. The error diagnostic and Code Action 'light-bulb' are also displayed when moving the cursor to any new line of code, even when all lines of code in the file have been commented out; that is, effectively, there are no longer any import statements in the code, and therefore also nothing to be sorted.
I'd appreciate comments on whether this is a recognised issue in VS Code, and if so, whether any workarounds are available. It defeats the purpose of having an 'error lightbulb' pop up on every line of code, just to find a code action recommending to fix the import order, even when this requires no fixing.
I have opened this question on this forum as recommended on the GitHub 'Contributing to VS Code' page.
Upgrade the isort extension version to latest(v2022.8.0).

Clicking does not work in Jupyterlab [OS X, chrome]

Bug description:
No response when clicking any buttons except files.
When I want to leave one cell to another, weird jumping back happens.
The demo below is more explanatory.
To Reproduce:
On my mac, basically after opening Jupyterlab, all clicks inside give no responses.
Expected behavior:
A normal and smooth experience like before.
Screenshots:
demo
Desktop (please complete the following information):
OS: [OSX 10.14.3]
Browser [chrome 72.0.3626.119]
JupyterLab [0.35.3]
Additional context:
Jupyterlab worked well one week ago on my OS X 10.11 El Capitan. And then I want to add a plugin (#lckr/jupyterlab_variableinspector). So I need to upgrade my node, npm and thus my OS X. After upgrading them and install the plugin, the problem happens. But I am not sure it is because of the version, because I did not use Jupyterlab in this week and may do something else to my system. I tried to disable the plugin and it did not help.
Problem solved. It was caused by a Chrome plugin with similar functions like "RightToCopy". I just deleted it and reinstalled the Chrome, then everything works well.

plt.plot() cause blue screen on windows

This code cause a blue screen on windows on my computer :
import matplotlib.pyplot as plt
plt.plot(range(10),range(10)) # This is the line that cause the crash
WhoCrashed tells me this :
This was probably caused by the following module: nt_wrong_symbols.sys
(nt_wrong_symbols) Bugcheck code: 0x124 (0x0, 0xFFFFB60A6AF4D028,
0xB2000000, 0x70005) Error: WHEA_UNCORRECTABLE_ERROR
Here is a link to the full Minidump
What I have done:
Fully tested the CPU with a CPU-Z stress test
Fully tested the RAM with memtest86+
Tested the GPU with Assassin's creed origin in full ultra
Tested the same code on Ubuntu (double boot) : works fine
This lead me to believe this is a windows specific error.
Hardware configuration :
i9-7940X
GTX 1080 Ti
64 Gb RAM #2400Mhz (CPU frequency)
Software :
Windows 10, fresh install (I've always had this issue)
Python 2.7 installed through Anaconda ( I tested the code with Jupyter and IPython with the same results)
Windows and graphic drivers up to date
This is the only thing that causes blue screen on my computer, and I'm out of ideas on how to solve this, any advice would be greatly appreciated.
NOTE : I asked this question here as it appears to be matplotlib related, I hope this is the right place
EDIT : Correction : it does not happens all the time, but more like 95% of the time.
I updated the BIOS and it seems to work now. As i9-7940X is very recent (Q3'17), my old BIOS version was supposed to work with it but was released before the CPU (06/17) so that might have been the issue.
I'll post again if blue screens come back.
I had the same problem on an Alienware Area 51 machine. Fixed it by disabling processor's "hyperthreading" on the BIOS configuration. Also, I had a similar crashing issue on another machine with Ubuntu when trying to use multithreading.
In conclusion Matplotlib and multithreading don't get along well.

VS Code: How to auto refresh Pylint

I want the Pylint style suggestions to automatically update in VS code. E.g. if there is a style error, and I fix it I want it to automatically update, so I know if it is fixed.
Right now I have to save the file, wait a bit, and then see if it fixed the issue.
I am using python 2.7 (via Anaconda) pylint (1.6.4), and in VS Code I have Python 0.5.8 and Python for VSCode 0.2.3
You could turn auto save on.
See also this thread on reddit: https://www.reddit.com/r/vscode/comments/8ab5hi/does_python_linting_only_run_upon_save/

Mayavi example fails, crashes python on Ubuntu

I'm trying to run a standard Mayavi example. I just installed mayavi2 on Ubuntu (Kubuntu 12.04) and this is my first step with Mayavi. Unfortunately, this step is failing.
The examples I wish to run come from here:
http://docs.enthought.com/mayavi/mayavi/auto/examples.html
For example, this one.
The behavior I am seeing is that the plot canvas area is blank (mostly). The popup window is shown and its controls are present and working.
The only errors I am seeing are:
libGL error: failed to load driver: swrast
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
Where would I add LIBGL_DEBUG=verbose?
I'm on Kubuntu 12.04 with:
Python 2.7.3
IPython 1.1.0
wxPython 2.8
vtk 5.8.0-5
setuptools, numpy, scipy - latest versions (just updated)
I am running the examples in IPython (which seems to be the recommended way). I am using this command to start the shell:
ipython --gui=wx --pylab=wx
I also tried running the examples from within an IPython notebook as so:
%run example.py
In all cases the examples fail to display the animation. The window itself is display as are the controls. But the animation canvas is mostly blank, although a flash of the images will sometimes appear.
At least once previously I saw my attempts crash Python. The message was:
The crashed program seems to use third-party or local libraries:
/usr/local/lib/python2.7/dist-packages/traits/ctraits.so
/usr/local/lib/python2.7/dist-packages/tvtk/array_ext.so
However, I am not seeing that crash now.
I found some important clues here:
https://askubuntu.com/questions/283640/libgl-error-failed-to-load-driver-i965
Like that person, I ended up reinstalling my graphics driver and that solved my problem. (The problem wasn't related to mayavi or python after all.)

Categories