-
Notifications
You must be signed in to change notification settings - Fork 375
Bug in Export as Python script #1405
Copy link
Copy link
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Description
Bug: Notebook Editor, Interactive Window, Editor cells
Steps to cause the bug to occur
- Launch a new or existing notebook with code and markdown
- Click "Export as" and select Python Script
Actual behavior
The cell marker for markdown in the exported script file appears as
null.tpl [markdown]
# ## headingExpected behavior
In version v2020.9.112786 the output python script appears as follows
# %% [markdown]
# ## headingYour Jupyter and/or Python environment
Please provide as much info as you readily know
- Jupyter server running: Local
- Extension version: v2020.9.114305
- VS Code version: 1.50.0
- Setting python.jediEnabled: false
- Setting python.languageServer: Microsoft
- Python and/or Anaconda version: 3.7 and 3.8
- OS: Mac
- Virtual environment: conda
Python Output
> pyenv root
> python3.7 ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python3.6 ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python3 ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python2 ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> ~/Applications/miniconda3/envs/hv5/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> ~/Applications/miniconda3/bin/conda info --json
Starting Microsoft Python language server.
> ~/Applications/miniconda3/bin/conda env list
Python interpreter path: ~/Applications/miniconda3/envs/hv5/bin/python
> ~/Applications/miniconda3/bin/conda env list
> ~/Applications/miniconda3/envs/plot/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py -c "import jupyter"
> ~/Applications/miniconda3/envs/plot/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py -c "import notebook"
> ~/Applications/miniconda3/envs/plot/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py jupyter kernelspec --version
> ~/Applications/miniconda3/envs/plot/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> ~/Applications/miniconda3/envs/plot/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> ~/Applications/miniconda3/envs/plot/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> ~/Applications/miniconda3/envs/hv5/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir ~/Desktop/t -s --cache-clear
cwd: ~/Desktop/t
Error 2020-10-10 11:25:54: Failed to parse discovered Test [r [Error]: Traceback (most recent call last):
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/run_adapter.py", line 17, in <module>
from testing_tools.adapter.__main__ import parse_args, main
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/__main__.py", line 9, in <module>
from . import pytest, report
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/pytest/__init__.py", line 7, in <module>
from ._discovery import discover
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 8, in <module>
import pytest
ModuleNotFoundError: No module named 'pytest'
at ChildProcess.<anonymous> (/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/out/client/extension.js:9:53541)
at Object.onceWrapper (events.js:313:26)
at ChildProcess.emit (events.js:223:5)
at ChildProcess.EventEmitter.emit (domain.js:475:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)]
> ~/Applications/miniconda3/bin/pytest --version
Error 2020-10-10 11:25:54: Python Extension: displayDiscoverStatus [r [Error]: Traceback (most recent call last):
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/run_adapter.py", line 17, in <module>
from testing_tools.adapter.__main__ import parse_args, main
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/__main__.py", line 9, in <module>
from . import pytest, report
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/pytest/__init__.py", line 7, in <module>
from ._discovery import discover
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 8, in <module>
import pytest
ModuleNotFoundError: No module named 'pytest'
at ChildProcess.<anonymous> (/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/out/client/extension.js:9:53541)
at Object.onceWrapper (events.js:313:26)
at ChildProcess.emit (events.js:223:5)
at ChildProcess.EventEmitter.emit (domain.js:475:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)]
> ~/Applications/miniconda3/envs/plot/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py -c "import nbconvert"
> ~/Applications/miniconda3/envs/plot/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py jupyter nbconvert --version
> ~/Applications/miniconda3/envs/plot/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py jupyter nbconvert --version
> ~/Applications/miniconda3/envs/plot/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py jupyter nbconvert --version
> ~/Applications/miniconda3/envs/plot/bin/python (daemon) -m jupyter nbconvert /var/folders/lk/s__7f9fx15x_zrw6q5xkmm500000gp/T/079a338f-17a4-4099-bc8e-d7e892f4ed32/tmp-24986s97W0AoEEAEI.ipynb --to python --stdout --template /var/folders/lk/s__7f9fx15x_zrw6q5xkmm500000gp/T/tmp-24986TD26cET8TVOb.tpl
> ~/Applications/miniconda3/envs/hv5/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir ~/Desktop/t -s
cwd: ~/Desktop/t
Error 2020-10-10 11:28:09: Failed to parse discovered Test [r [Error]: Traceback (most recent call last):
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/run_adapter.py", line 17, in <module>
from testing_tools.adapter.__main__ import parse_args, main
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/__main__.py", line 9, in <module>
from . import pytest, report
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/pytest/__init__.py", line 7, in <module>
from ._discovery import discover
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 8, in <module>
import pytest
ModuleNotFoundError: No module named 'pytest'
at ChildProcess.<anonymous> (/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/out/client/extension.js:9:53541)
at Object.onceWrapper (events.js:313:26)
at ChildProcess.emit (events.js:223:5)
at ChildProcess.EventEmitter.emit (domain.js:475:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)]
> ~/Applications/miniconda3/envs/hv5/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir ~/Desktop/t -s
cwd: ~/Desktop/t
Error 2020-10-10 11:28:12: Failed to parse discovered Test [r [Error]: Traceback (most recent call last):
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/run_adapter.py", line 17, in <module>
from testing_tools.adapter.__main__ import parse_args, main
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/__main__.py", line 9, in <module>
from . import pytest, report
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/pytest/__init__.py", line 7, in <module>
from ._discovery import discover
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 8, in <module>
import pytest
ModuleNotFoundError: No module named 'pytest'
at ChildProcess.<anonymous> (/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/out/client/extension.js:9:53541)
at Object.onceWrapper (events.js:313:26)
at ChildProcess.emit (events.js:223:5)
at ChildProcess.EventEmitter.emit (domain.js:475:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)]
Starting Microsoft Python language server.
Python interpreter path: ~/Applications/miniconda3/envs/data/bin/python
> ~/Applications/miniconda3/bin/conda info --json
> ~/Applications/miniconda3/bin/conda info --json
> ~/Applications/miniconda3/envs/data/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir ~/Desktop/t -s --cache-clear
cwd: ~/Desktop/t
Error 2020-10-10 11:28:14: Failed to parse discovered Test [r [Error]: Traceback (most recent call last):
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/run_adapter.py", line 17, in <module>
from testing_tools.adapter.__main__ import parse_args, main
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/__main__.py", line 9, in <module>
from . import pytest, report
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/pytest/__init__.py", line 7, in <module>
from ._discovery import discover
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 8, in <module>
import pytest
ModuleNotFoundError: No module named 'pytest'
at ChildProcess.<anonymous> (/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/out/client/extension.js:9:53541)
at Object.onceWrapper (events.js:313:26)
at ChildProcess.emit (events.js:223:5)
at ChildProcess.EventEmitter.emit (domain.js:475:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)]
> ~/Applications/miniconda3/bin/pytest --version
Error 2020-10-10 11:28:14: Python Extension: displayDiscoverStatus [r [Error]: Traceback (most recent call last):
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/run_adapter.py", line 17, in <module>
from testing_tools.adapter.__main__ import parse_args, main
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/__main__.py", line 9, in <module>
from . import pytest, report
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/pytest/__init__.py", line 7, in <module>
from ._discovery import discover
File "/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 8, in <module>
import pytest
ModuleNotFoundError: No module named 'pytest'
at ChildProcess.<anonymous> (/Users/adefusco/.vscode/extensions/ms-python.python-2020.9.114305/out/client/extension.js:9:53541)
at Object.onceWrapper (events.js:313:26)
at ChildProcess.emit (events.js:223:5)
at ChildProcess.EventEmitter.emit (domain.js:475:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)]
> ~/Applications/miniconda3/envs/plot/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py jupyter nbconvert --version
> ~/Applications/miniconda3/envs/plot/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py jupyter nbconvert --version
> ~/Applications/miniconda3/envs/plot/bin/python ~/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/pyvsc-run-isolated.py jupyter nbconvert --version
> ~/Applications/miniconda3/envs/plot/bin/python (daemon) -m jupyter nbconvert /var/folders/lk/s__7f9fx15x_zrw6q5xkmm500000gp/T/45b5a54d-be0e-40be-b683-0045c063ac6b/tmp-24986ZT61YC7tA6Bk.ipynb --to python --stdout --template /var/folders/lk/s__7f9fx15x_zrw6q5xkmm500000gp/T/tmp-24986TD26cET8TVOb.tpl
Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug