12

I'm running jupyter notebooks in VSCode and have a return of a very large json - too large to see it all in the jupyter notebook.

When I prettyprint the json in VSCode, it shows some of the data, then: "show more (open the raw output data in a text editor) . . . "

When I click on that, VSCode pops up a msg, "The window is not responding".

How do I make this link work and open that json in Notepad++, which is installed?

Alternatively, how can I dump this json to text file so I can view in a text editor?

jub
  • 377
  • 1
  • 2
  • 14
  • Figured out how to write to file. Is there a way to incorporate the prettyprint formatting in the output that is written to file? `import json with open('output.txt', 'w') as output_file: output_file.write(json.dumps(output_data))` – jub Jul 11 '21 at 00:10

3 Answers3

14

Once notebooks were natively supported by VSCode, the setting changed to notebook.output.textLineLimit.

darda
  • 3,597
  • 6
  • 36
  • 49
4

You can try to set the 'Max Output Size', which is the setting of the jupyter extension, and check if it works.

If the 'Max Output Size' can't work, use logs or files to keep your output is wise.

njulhy
  • 67
  • 1
  • 4
0

On VSCode version 1.77.3 is Notebook > Output: Text Line Limit

enter image description here

Alfredo EP
  • 51
  • 1
  • 3