Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nbterm - new notebook not running #24

Open
amrrs opened this issue Apr 27, 2021 · 9 comments
Open

nbterm - new notebook not running #24

amrrs opened this issue Apr 27, 2021 · 9 comments

Comments

@amrrs
Copy link

amrrs commented Apr 27, 2021

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
Copy link
Author

amrrs commented Apr 27, 2021

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

@amrrs
Copy link
Author

amrrs commented Apr 27, 2021

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

@amrrs amrrs changed the title nbterm - new notebook not starting with any kernel (it seems) nbterm - new notebook not running Apr 27, 2021
@davidbrochart
Copy link
Owner

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

@amrrs
Copy link
Author

amrrs commented Apr 28, 2021

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

@oricou
Copy link

oricou commented Apr 28, 2021

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
Copy link

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

@Aduboahen
Copy link

Aduboahen commented Apr 28, 2021

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
Copy link

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
Copy link

dirkroorda commented Jul 15, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants