Skip to content

setting notebook.output.textLineLimit to 0 always truncates #12977

Closed
microsoft/vscode
#200269

Description

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

  1. The output cell shows "..." 5 lines before the end of the output and issues a "Output exceeds the [size limit]" bug even if it does not omit anything. The "..." and "output exceeds" statement appear to trigger erroneously when the output is between 2 lines shorter than the limit and exactly at the limit. Unless I misunderstood the situation, please only emit the two strings when there is in fact an omission.

For example, I start with a blank settings,json and set:

notebook.output.textLineLimit=10

then I close and reopen VS Code, and execute the following in an otherwise blank notebook:

for i in range(9):
    print(i)

and the output is:

Output exceeds the [size limit](command:workbench.action.openSettings?%5B%22notebook.output.textLineLimit%22%5D). Open the full output data [in a text editor](command:workbench.action.openLargeOutput?ab639b73-38ad-40ba-99b7-83b6515da095)
0
1
2
3
4
...
5
6
7
8

Nothing was omitted and the limit was not exceeded. The "..." and the "Output exceeds the size limit. Open the full output data [in a text editor]" messages appear to be in error.

If I instead generate up to 2 lines fewer than the limit, everything works as expected. For example:

for i in range(8):
    print(i)

generates:

0
1
2
3
4
5
6
7
  1. I sometimes need to produce notebooks that show all their output to produce complete documentation in HTML or PDF. Is there a way to do so? In prior versions, I could get the desired unlimited output behavior by setting the line limit to zero. Now that seems to display all output sometimes and to display no output sometimes and to always display the "Output exceeds the [size limit]" and the "..." even if it displays all the output.

VS Code Version

1.75.1 and 1.76.0

Jupyter Extension Version

v2023.2.1000592019

Jupyter logs

<let me know if you need them.>

Coding Language and Runtime Version

Python 3.10.9 and Python 3.9.7

Language Extension Version (if applicable)

v2023.4.0

Anaconda Version (if applicable)

Anaconda3-2021.11-Windows-x86_64

Running Jupyter locally or remotely?

Local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugnotebook-output

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions