Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error decorations persist in jupyter notebooks (ipynb) after resolution #223

Open
sfc-gh-catkinson opened this issue Nov 28, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@sfc-gh-catkinson
Copy link

sfc-gh-catkinson commented Nov 28, 2024

When the errors origin lies in a different code cell after resolution the decoration still persists:

Reproducing:

  1. create a new jupyter notebook

  2. create a new code cell containing

    mymessage = "something very interesting"

  3. Create s econd code cell containing

    print(mymessages)

image

  1. Run the two cells , decoration highlights the name error correctly

image

  1. Correct the second cells value to:

    print(mymessage)

  2. Run the second cell. the code runs successfully, but the error decoration persists

image

@toiletbowlkuku
Copy link

Having the same issue here. There should be a mechanism to update the error decoration after running code.

@usernamehw
Copy link
Owner

Thing is - I don't use Python or Jupyter or Notebooks.

It doesn't even show errors with the steps provided(Only a warning from Pylance):

@usernamehw
Copy link
Owner

usernamehw commented Dec 20, 2024

Added command to force update decorations. Example to run from keybindings.json (after Run All):

{
	"key": "ctrl+shift+5",
	"command": "runCommands",
	"args": {
		"commands": [
			"notebook.execute",
			"errorLens.updateEverything",
		],
	},
},

@emretepedev
Copy link

Same issue here. The last highlight still appears even after it's resolved until the Reload Window command. The Update Everything command does not work for me @usernamehw

@usernamehw
Copy link
Owner

Is that command not working at all? Maybe runCommands doesn't wait for the previous command to be executed. What if you run it via Command Palette Error Lens: Update Everything? If it works - then maybe the delayed version will work; like when using Commands extension.

{
	"key": "ctrl+shift+5",
	"command": "commands.run",
	"args": [
		{
			"command": "notebook.execute",
		},
		{
			"delay": 2000,
			"command": "errorLens.updateEverything",
		},
	],
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants