Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why the value returned by read_data,open... are unavailable in Jupyter notebook

I run the following commands in code cell of jupyternotebook.

indata = tmp_filename()
 f = open(indata, "w")
 f.write("17\n42\n")
 f.close()
 l = read_data(indata, ZZ); l

And I get the following error message:

TypeError: 'NoneType' object is not iterable

But the result is output in terminal.

[I 21:15:07.797 NotebookApp] Saving file at /Untitled.ipynb
[17, 42]

How to solve this problem?

By the way: the "print" function also can not output in Jupternotebook.

Why the value returned by read_data,open... are unavailable in Jupyter notebook

I run the following commands in code cell of jupyternotebook.

indata = tmp_filename()
 f = open(indata, "w")
 f.write("17\n42\n")
 f.close()
 l = read_data(indata, ZZ); l

And I get the following error message:

TypeError: 'NoneType' object is not iterable

But the result is output in terminal.

[I 21:15:07.797 NotebookApp] Saving file at /Untitled.ipynb
[17, 42]

How to solve this problem?

By the way: the "print" function some functions such as "print", "tmp_filename" also can not output in Jupternotebook.

Why the value returned by read_data,open... are unavailable in Jupyter notebook

I run the following commands in code cell of jupyternotebook.

indata = tmp_filename()
 f = open(indata, "w")
 f.write("17\n42\n")
 f.close()
 l = read_data(indata, ZZ); l

And I get the following error message:

TypeError: 'NoneType' object is not iterable

But the result is output in terminal.

[I 21:15:07.797 NotebookApp] Saving file at /Untitled.ipynb
[17, 42]

How to solve this problem?

By the way: some functions such as "print", "tmp_filename" also can not output in Jupternotebook.Jupter notebook. These functions work well in old sage math notebook.