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

Code in NB editor differs from executed code. #2050

Closed
kuelumbus opened this issue Apr 3, 2020 · 10 comments
Closed

Code in NB editor differs from executed code. #2050

kuelumbus opened this issue Apr 3, 2020 · 10 comments
Assignees

Comments

@kuelumbus
Copy link

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur

Seems to occur randomly. Could it be connected to triggering the auto completion?

Actual behavior

image

Conversion to python file:
image

{ "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "output_type": "error", "ename": "SyntaxError", "evalue": "invalid syntax (<ipython-input-24-832501616022>, line 1)", "traceback": [ "\u001b[0;36m File \u001b[0;32m\"<ipython-input-24-832501616022>\"\u001b[0;36m, line \u001b[0;32m1\u001b[0m\n\u001b[0;31m df.melt(id_vars=fps) value_vars=props)ropna()\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" ] } ], "source": [ "df.melt(id_vars=fps) value_vars=props)ropna()\n", "\n", "" ] },

If I reopen the file, the code is correctly displayed again.

Expected behavior

No errors.

Your Jupyter and/or Python environment

Please provide as much info as you readily know

  • Jupyter server running: Remote
  • Extension version: 2020.4.71515-dev
  • Setting python.jediEnabled: false
  • Python and/or Anaconda version: 3.7
  • OS: Windows | Mac | Linux (distro): Ubuntu 16.04
  • Virtual environment: virtualenv

Version: 1.44.0-insider
Commit: d8e3cca049b1baa317ab9ef0d3f673b08e53d8fa
Date: 2020-04-02T06:41:04.634Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.3.0-42-generic snap

Developer Tools Console Output

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer

@kuelumbus kuelumbus changed the title Code in NB editor differs from executed text. Code in NB editor differs from executed code. Apr 3, 2020
@jmew
Copy link
Contributor

jmew commented Apr 3, 2020

Thanks for the issue. Could you clarify if this happens every time? And is it only with this specific line of code or for all lines?

@greazer
Copy link
Member

greazer commented Apr 3, 2020

This looks highly related to microsoft/vscode-python#10773

@kuelumbus
Copy link
Author

kuelumbus commented Apr 3, 2020

This happens each time I execute the cell. It works if I copy the code into a new cell. I have had this issue also for multiple lines.

Unfortunately, I couldn't find a way to reproduce.

@kuelumbus
Copy link
Author

Also, the file name is missing File "", line 21 🤔

@jmew
Copy link
Contributor

jmew commented Apr 3, 2020

Thanks, we'll look into this

@DonJayamanne
Copy link
Contributor

@davidefiocco

  • Please could you provide the version of the extension you are using at your end
  • Please could you provide some steps to repro this issue (or screenshots of the error & code).

@kuelumbus
Copy link
Author

I just had a short interruption of my internet connection on which VSCode automatically reconnected to my server (I am working remotely). This triggered the issue for me.

@davidefiocco
Copy link

@davidefiocco

* Please could you provide the version of the extension you are using at your end

* Please could you provide some steps to repro this issue (or screenshots of the error & code).

@DonJayamanne not sure you meant to address me, anyway that info should be on https://github.com/microsoft/vscode-python/issues/10951

@DonJayamanne
Copy link
Contributor

I'm sorry for the issues this may have caused.
I have been able to identify the cause of the issue and will be working on a fix.

@rchiodo
Copy link
Contributor

rchiodo commented Apr 10, 2020

Validated. Should be fixed in the next release

@rchiodo rchiodo closed this as completed Apr 10, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 18, 2020
@microsoft microsoft unlocked this conversation Nov 13, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 13, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants