davidbrochart / nbterm

Jupyter Notebooks in the terminal.
MIT License
745 stars 37 forks source link

nbterm - new notebook not running #24

Open amrrs opened 3 years ago

amrrs commented 3 years ago

When I use nbterm new_notebook.ipynb it displays a notebook but when I try to run something in the cell like 2+2 it just shows that it's executing but nothing seems to happen, I doubt if it's because no Kernel is initialized ?

I've multiple kernels like R, python and Jupyter notebook usually initializes with Python.
image

amrrs commented 3 years ago

Probably my assumption is wrong, when I run it with no-kernel nothing happens like executing. so it's something else.

amrrs commented 3 years ago

Just to add, If I open an existing jupyter notebook (Python kernel) it works just fine.

davidbrochart commented 3 years ago

I'm wondering what are these ^Z^Z in you cell, maybe it's because of that?

amrrs commented 3 years ago

No that was actually me trying to figure out different options to exit as Ctrl+q wasn't working as well

oricou commented 3 years ago

Did you get any error message when starting nbterm (before seeing the notebook)? Did you exit the cell (with Esc) before you run (Ctrl-r)?

Aduboahen commented 3 years ago

I just installed nbterm and I have the same issue including "ctrl-q" not working.

Aduboahen commented 3 years ago

Did you get any error message when starting nbterm (before seeing the notebook)? Did you exit the cell (with Esc) before you run (Ctrl-r)?

I got an error message.

`Unhandled exception in event loop: File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\kernel_driver\driver.py", line 99, in start self.shell_channel = connect_channel("shell", self.connection_cfg) File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\kernel_driver\connect.py", line 93, in connect_channel sock = create_socket(channel_name, cfg) File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\kernel_driver\connect.py", line 86, in create_socket sock = context.socket(socket_type) File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\zmq\sugar\context.py", line 226, in socket s = self._socket_class(self, socket_type, **kwargs) File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\zmq_future.py", line 144, in init self._init_io_state() File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\zmq\asyncio__init__.py", line 53, in _init_io_state self.io_loop.add_reader(self._fd, lambda : self._handle_events(0, 0)) File "c:\users\dell\appdata\local\programs\python\python38\lib\asyncio\events.py", line 501, in add_reader raise NotImplementedError

Exception Press ENTER to continue...`

│Exception ignored in: <function Socket.__del__ at 0x000001609E8D8C10> │ Traceback (most recent call last):───────────────────────────────────────────────────────────────────────────────────┘ File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__ self.close() File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\zmq\_future.py", line 160, in close self._clear_io_state() File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state self.io_loop.remove_reader(self._fd) File "c:\users\dell\appdata\local\programs\python\python38\lib\asyncio\events.py", line 504, in remove_reader raise NotImplementedError NotImplementedError:

Aduboahen commented 3 years ago

I just installed nbterm and I have the same issue including "ctrl-q" not working.

Existing notebooks are also not running

Traceback (most recent call last): File "c:\users\dell\appdata\local\programs\python\python38\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\dell\appdata\local\programs\python\python38\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\dell\AppData\Local\Programs\Python\Python38\Scripts\nbterm.exe\__main__.py", line 7, in <module> File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\nbterm\nbterm.py", line 43, in cli typer.run(main) File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\typer\main.py", line 859, in run app() File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\typer\main.py", line 214, in __call__ return get_command(self)(*args, **kwargs) File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 829, in __call__ return self.main(*args, **kwargs) File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 782, in main rv = self.invoke(ctx) File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 610, in invoke return callback(*args, **kwargs) File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\typer\main.py", line 497, in wrapper return callback(**use_params) # type: ignore File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\nbterm\nbterm.py", line 29, in main nb = Notebook(notebook_path, no_kernel=no_kernel or False, save_path=save_path) File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\nbterm\notebook.py", line 61, in __init__ self.read_nb() File "c:\users\dell\appdata\local\programs\python\python38\lib\site-packages\nbterm\format.py", line 13, in read_nb self.json = json.load(f) File "c:\users\dell\appdata\local\programs\python\python38\lib\json\__init__.py", line 293, in load return loads(fp.read(), File "c:\users\dell\appdata\local\programs\python\python38\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 3556: character maps to <undefined>

dirkroorda commented 3 years ago

After installation under python 3.9.5 it does not run cells in a new notebook nor in existing notebooks. The status line says

python3 (busy)

From then on, it is not possible to quit nbterm other than quitting the terminal. I see that I have to quit twice because of unsaved changes, but that does not work. When I save, and then press Ctrl-Q, nbterm still does not exit.