Jupyter notebook kernel not connecting - python

I have previously used Jupyter Notebook (python 2 and 3) on my mac. After not using it for a while, there seems to be a problem I am unable to fix. When starting the notebook from terminal using the command Jupyter notebook, and then select a notebook I want to work with, I get the error:
"A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connection or notebook server configuration."
I am positive this has nothing to do with my internet connection (I have tried 2 machines connected to different networks).
I have read that the browser could be the problem, therefore I have installed Chrome and Firefox. However, I get this error when I am using Safari, Chrome, and Firefox.
Then I read about it being a proxy issue. I have tried to add the server address of the notebook to the No proxy fields of the advanced network preferences of my mac, and of the advanced setting on Firefox.
The only thing I can think of is that I am entering the wrong server address?
I do not know much about setting and errors in general, hopefully someone can provide me with some alternative options to get Jupyter working again.
Terminal output:
ValueError: signal only works in main thread
ERROR:tornado.application:Exception in callback <functools.partial object at 0x111e2b208>
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/ioloop.py", line 759, in _run_callback
ret = callback()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/stack_context.py", line 276, in null_wrapper
return fn(*args, **kwargs)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/zmq/eventloop/zmqstream.py", line 536, in <lambda>
self.io_loop.add_callback(lambda : self._handle_events(self.socket, 0))
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/zmq/eventloop/zmqstream.py", line 450, in _handle_events
self._handle_recv()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/zmq/eventloop/zmqstream.py", line 480, in _handle_recv
self._run_callback(callback, msg)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/zmq/eventloop/zmqstream.py", line 432, in _run_callback
callback(*args, **kwargs)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/stack_context.py", line 276, in null_wrapper
return fn(*args, **kwargs)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelbase.py", line 283, in dispatcher
return self.dispatch_shell(stream, msg)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelbase.py", line 233, in dispatch_shell
self.pre_handler_hook()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelbase.py", line 248, in pre_handler_hook
self.saved_sigint_handler = signal(SIGINT, default_int_handler)
ValueError: signal only works in main thread
[I 19:03:26.685 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel_launcher.py", line 16, in <module>
app.launch_new_instance()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelapp.py", line 477, in start
ioloop.IOLoop.instance().start()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/ioloop.py", line 928, in start
raise RuntimeError("IOLoop is already running")
RuntimeError: IOLoop is already running
[I 19:03:29.696 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel_launcher.py", line 16, in <module>
app.launch_new_instance()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelapp.py", line 477, in start
ioloop.IOLoop.instance().start()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/ioloop.py", line 928, in start
raise RuntimeError("IOLoop is already running")
RuntimeError: IOLoop is already running
[I 19:03:32.712 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel_launcher.py", line 16, in <module>
app.launch_new_instance()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelapp.py", line 477, in start
ioloop.IOLoop.instance().start()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/ioloop.py", line 928, in start
raise RuntimeError("IOLoop is already running")
RuntimeError: IOLoop is already running
[W 19:03:33.717 NotebookApp] Timeout waiting for kernel_info reply from 2cf24420-719b-4666-ad9f-fcdf8db505f3
[E 19:03:33.721 NotebookApp] Uncaught exception in /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505f3/channels
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/websocket.py", line 498, in _run_callback
result = callback(*args, **kwargs)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/services/kernels/handlers.py", line 262, in open
super(ZMQChannelsHandler, self).open()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/base/zmqhandlers.py", line 176, in open
self.send_ping, self.ping_interval, io_loop=loop,
TypeError: __init__() got an unexpected keyword argument 'io_loop'
[E 19:03:34.749 NotebookApp] Uncaught exception in /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505f3/channels
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/websocket.py", line 498, in _run_callback
result = callback(*args, **kwargs)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/services/kernels/handlers.py", line 262, in open
super(ZMQChannelsHandler, self).open()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/base/zmqhandlers.py", line 176, in open
self.send_ping, self.ping_interval, io_loop=loop,
TypeError: __init__() got an unexpected keyword argument 'io_loop'
[I 19:03:35.724 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
[E 19:03:35.771 NotebookApp] Uncaught exception in /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505f3/channels
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/websocket.py", line 498, in _run_callback
result = callback(*args, **kwargs)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/services/kernels/handlers.py", line 262, in open
super(ZMQChannelsHandler, self).open()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/base/zmqhandlers.py", line 176, in open
self.send_ping, self.ping_interval, io_loop=loop,
TypeError: __init__() got an unexpected keyword argument 'io_loop'
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Users/xxx/anaconda2/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel_launcher.py", line 16, in <module>
app.launch_new_instance()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/ipykernel/kernelapp.py", line 477, in start
ioloop.IOLoop.instance().start()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/ioloop.py", line 928, in start
raise RuntimeError("IOLoop is already running")
RuntimeError: IOLoop is already running
[E 19:03:36.791 NotebookApp] Uncaught exception in /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505f3/channels
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/websocket.py", line 498, in _run_callback
result = callback(*args, **kwargs)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/services/kernels/handlers.py", line 262, in open
super(ZMQChannelsHandler, self).open()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/base/zmqhandlers.py", line 176, in open
self.send_ping, self.ping_interval, io_loop=loop,
TypeError: __init__() got an unexpected keyword argument 'io_loop'
[E 19:03:37.810 NotebookApp] Uncaught exception in /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505f3/channels
Traceback (most recent call last):
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/tornado/websocket.py", line 498, in _run_callback
result = callback(*args, **kwargs)
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/services/kernels/handlers.py", line 262, in open
super(ZMQChannelsHandler, self).open()
File "/Users/xxx/anaconda2/lib/python2.7/site-packages/notebook/base/zmqhandlers.py", line 176, in open
self.send_ping, self.ping_interval, io_loop=loop,
TypeError: __init__() got an unexpected keyword argument 'io_loop'
[W 19:03:38.733 NotebookApp] KernelRestarter: restart failed
[W 19:03:38.733 NotebookApp] Kernel 2cf24420-719b-4666-ad9f-fcdf8db505f3 died, removing from map.
[W 19:03:38.830 NotebookApp] 404 GET /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505f3/channels?session_id=3F75F379F865488D8379D3BB7FC0BF0F (::1): Kernel does not exist: 2cf24420-719b-4666-ad9f-fcdf8db505f3
[W 19:03:38.838 NotebookApp] 404 GET /api/kernels/2cf24420-719b-4666-ad9f-fcdf8db505f3/channels?session_id=3F75F379F865488D8379D3BB7FC0BF0F (::1) 12.00ms referer=None
[W 19:03:40.859 NotebookApp] Replacing stale connection: 2cf24420-719b-4666-ad9f-fcdf8db505f3:3F75F379F865488D8379D3BB7FC0BF0F

Running the following version of jupyter and tornado seemed to solve the issue:
Jupyter: 4.4.0
Tornado: 4.5.3
I needed to downgrade my version of tornado (which was 5.0.2)

I faced this problem too. My problem was because of a custom module name. I named the module 'copy.py.' My issue was solved when I renamed it.

I found a way out, Installing Python on my PC solved it. I didn't install python before installing anaconda

I was also facing the kernal related issues and all my problems were solved by installing jupyter notebook from anaconda navigator.
So,The best way to handle jupyter notebook related problems is to install jupyter notebook from anaconda navigator for your environment in which you want to run jupyter notebook. If you will install jupyter notebook from anaconda navigator then you will not face any problem.

Related

Issue while integrating PyCharm with Databricks cluster

I am trying to integrate PyCharm with my team's Databricks cluster using databricks-connect. I created a venv and did a pip install databricks-connect. Then I configured it with the necessary info of databricks cluster. When I run databricks-test, I see the following error. I followed this databricks documentation. I am using Python 3.8 and databricks-connect 9.1.(since the cluster runs this version). I tried changing version of databricks-connect to 10.4. but the same issue shows up again, been experimenting with different versions(tried creating a virtual environment through Anaconda prompt, but that too ran into the same issue). Any help is appreciated.
(venv) C:\Users\xxxxxxxx>databricks-connect test
* PySpark is installed at C:\Users\xxxxxxxx\Documents\pythonProject\venv\lib\site-packages\pyspark
* Checking SPARK_HOME
* Checking java version
java version "1.8.0_341"
Java(TM) SE Runtime Environment (build 1.8.0_341-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.341-b10, mixed mode)
* Skipping scala command test on Windows
* Testing python command
Traceback (most recent call last):
File "C:\Users\xxxxxxxx\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\xxxxxxxx\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\xxxxxxxx\Documents\pythonProject\venv\Scripts\databricks-connect.exe\__main__.py", line 7, in <module>
File "C:\Users\xxxxxxxx\Documents\pythonProject\venv\lib\site-packages\pyspark\databricks_connect.py", line 283, in main
test()
File "C:\Users\xxxxxxxx\Documents\pythonProject\venv\lib\site-packages\pyspark\databricks_connect.py", line 248, in test
spark = SparkSession.builder.getOrCreate()
File "C:\Users\xxxxxxxx\Documents\pythonProject\venv\lib\site-packages\pyspark\sql\session.py", line 229, in getOrCreate
sc = SparkContext.getOrCreate(sparkConf)
File "C:\Users\xxxxxxxx\Documents\pythonProject\venv\lib\site-packages\pyspark\context.py", line 392, in getOrCreate
SparkContext(conf=conf or SparkConf())
File "C:\Users\xxxxxxxx\Documents\pythonProject\venv\lib\site-packages\pyspark\context.py", line 145, in __init__
SparkContext._ensure_initialized(self, gateway=gateway, conf=conf)
File "C:\Users\xxxxxxxx\Documents\pythonProject\venv\lib\site-packages\pyspark\context.py", line 339, in _ensure_initialized
SparkContext._gateway = gateway or launch_gateway(conf)
File "C:\Users\xxxxxxxx\Documents\pythonProject\venv\lib\site-packages\pyspark\java_gateway.py", line 101, in launch_gateway
proc = Popen(command, **popen_kwargs)
File "C:\Users\xxxxxxxx\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\xxxxxxxx\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1334, in _execute_child
_winapi.CloseHandle(ht)
OSError: [WinError 6] The handle is invalid
Exception ignored in: <function Popen.__del__ at 0x000002CA0B15C0D0>
Traceback (most recent call last):
File "C:\Users\xxxxxxxx\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 949, in __del__
self._internal_poll(_deadstate=_maxsize)
File "C:\Users\xxxxxxxx\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1348, in _internal_poll
if _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0:
OSError: [WinError 6] The handle is invalid
Exception ignored in: <function Handle.Close at 0x000002CA0B15B3A0>
Traceback (most recent call last):
File "C:\Users\xxxxxxxx\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 194, in Close
CloseHandle(self)
OSError: [WinError 6] The handle is invalid

How do I resolve this error when I open Jupyter notbook?

error message
(base) grantmeadowsjr#Grants-Mac ~ % jupyter lab
[I 2021-11-27 10:33:53.031 ServerApp] jupyterlab | extension was successfully linked.
[I 2021-11-27 10:33:53.429 ServerApp] nbclassic | extension was successfully linked.
Traceback (most recent call last):
File "/opt/anaconda3/bin/jupyter-lab", line 10, in <module>
sys.exit(main())
File "/opt/anaconda3/lib/python3.9/site-packages/jupyter_server/extension/application.py", line 510, in launch_instance
serverapp = cls.initialize_server(argv=args)
File "/opt/anaconda3/lib/python3.9/site-packages/jupyter_server/extension/application.py", line 479, in initialize_server
serverapp.initialize(
File "/opt/anaconda3/lib/python3.9/site-packages/traitlets/config/application.py", line 88, in inner
return method(app, *args, **kwargs)
File "/opt/anaconda3/lib/python3.9/site-packages/jupyter_server/serverapp.py", line 1831, in initialize
self.init_httpserver()
File "/opt/anaconda3/lib/python3.9/site-packages/jupyter_server/serverapp.py", line 1752, in init_httpserver
self.http_server.listen(port, self.ip)
File "/opt/anaconda3/lib/python3.9/site-packages/tornado/tcpserver.py", line 151, in listen
sockets = bind_sockets(port, address=address)
File "/opt/anaconda3/lib/python3.9/site-packages/tornado/netutil.py", line 161, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 49] Can't assign requested address
This is the error I receive when I open jupyter notebook from anaconda. I am not very familiar with using the mac terminal, I had to download anaconda for my class.

How do I use the 'keyboard' python module in a docker container without an error?

I am trying to use the python module keyboard in a docker container for testing automation that emulates keyboard presses. However, this module continually returns an error in the docker container whereas it works fine in an ubuntu VM.
I have installed different commonly used docker containers and different versions of python. I get the same error. Sadly, google hasn't been as helpful as it usually is here.
Here's an easily reproducible version of what I've done:
docker run -t -d -u root --name docker_container python:3.7
echo $(docker exec -u root docker_container bash -c 'python3 -m keyboard' )
This returns the below error message:
/usr/local/lib/python3.7/site-packages/keyboard/_nixkeyboard.py:110: UserWarning: Failed to create a device file using `uinput` module. Sending of events may be limited or unavailable depending on plugged-in devices.
device = aggregate_devices('kbd')
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.7/site-packages/keyboard/_nixcommon.py", line 106, in start_reading
self.event_queue.put(device.read_event())
File "/usr/local/lib/python3.7/site-packages/keyboard/_nixcommon.py", line 83, in read_event
data = self.input_file.read(struct.calcsize(event_bin_format))
AttributeError: 'NoneType' object has no attribute 'read'
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.7/site-packages/keyboard/_nixcommon.py", line 106, in start_reading
self.event_queue.put(device.read_event())
File "/usr/local/lib/python3.7/site-packages/keyboard/_nixcommon.py", line 83, in read_event
data = self.input_file.read(struct.calcsize(event_bin_format))
AttributeError: 'NoneType' object has no attribute 'read'
Traceback (most recent call last):
File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.7/site-packages/keyboard/__main__.py", line 10, in <module>
keyboard.hook(print_event_json)
File "/usr/local/lib/python3.7/site-packages/keyboard/__init__.py", line 459, in hook
append(callback)
File "/usr/local/lib/python3.7/site-packages/keyboard/_generic.py", line 67, in add_handler
self.start_if_necessary()
File "/usr/local/lib/python3.7/site-packages/keyboard/_generic.py", line 35, in start_if_necessary
self.init()
File "/usr/local/lib/python3.7/site-packages/keyboard/__init__.py", line 194, in init
_os_keyboard.init()
File "/usr/local/lib/python3.7/site-packages/keyboard/_nixkeyboard.py", line 114, in init
build_tables()
File "/usr/local/lib/python3.7/site-packages/keyboard/_nixkeyboard.py", line 73, in build_tables
dump = check_output(['dumpkeys', '--keys-only'], universal_newlines=True)
File "/usr/local/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/usr/local/lib/python3.7/subprocess.py", line 472, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/lib/python3.7/subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.7/subprocess.py", line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'dumpkeys': 'dumpkeys'
From what I understand, it can't access a uinput device / keyboard to be able to dump the keys. Is there a way to virtually simulate a keyboard in the container to allow this to work?
try to install the following:
apt-get install -y kmod kbd
since you need this to get dumpkeys

Error when trying repo init on external drive on Ubuntu

I'm trying to init repo of Android ROM, but it returns following error on Ubuntu 16.04:
$ repo init -u git://github.com/AOSiP/platform_manifest.git -b pie
Get git://github.com/AOSiP/platform_manifest.git
Traceback (most recent call last):
File "/media/exthdd/AOSIP/.repo/repo/main.py", line 547, in <module>
_Main(sys.argv[1:])
File "/media/exthdd/AOSIP/.repo/repo/main.py", line 522, in _Main
result = repo._Run(argv) or 0
File "/media/exthdd/AOSIP/.repo/repo/main.py", line 184, in _Run
result = cmd.Execute(copts, cargs)
File "/media/exthdd/AOSIP/.repo/repo/subcmds/init.py", line 426, in Execute
self._SyncManifest(opt)
File "/media/exthdd/AOSIP/.repo/repo/subcmds/init.py", line 188, in _SyncManifest
m._InitGitDir(mirror_git=mirrored_manifest_git)
File "/media/exthdd/AOSIP/.repo/repo/project.py", line 2395, in _InitGitDir
self._UpdateHooks()
File "/media/exthdd/AOSIP/.repo/repo/project.py", line 2416, in _UpdateHooks
self._InitHooks()
File "/media/exthdd/AOSIP/.repo/repo/project.py", line 2446, in _InitHooks
os.path.relpath(stock_hook, os.path.dirname(dst)), dst)
File "/media/exthdd/AOSIP/.repo/repo/platform_utils.py", line 195, in symlink
return os.symlink(source, link_name)
OSError: [Errno 38] Function not implemented
It works when running on system drive, but I don't have enough space there.
Drive had exFAT filesystem, error gone on ext4.

Jupyter notebooks: Tornado pointing to incorrect path

I'm trying to run a Jupyter notebook. I installed Anaconda 5.3 with the Python 3.7 version. The notebook starts up, but the Kernel fails to run because it's pointing to another version of Tornado that I've installed for some of my ROS projects (output below). How do I ensure the Jupyter kernel is using Tornado installed in the Anaconda path?
[I 10:56:54.649 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
Traceback (most recent call last):
File "/dir/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/dir/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/dir/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py", line 16, in <module>
app.launch_new_instance()
File "/dir/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "<decorator-gen-123>", line 2, in initialize
File "/dir/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/dir/anaconda3/lib/python3.7/site-packages/ipykernel/kernelapp.py", line 467, in initialize
self.init_sockets()
File "/dir/anaconda3/lib/python3.7/site-packages/ipykernel/kernelapp.py", line 260, in init_sockets
self.init_iopub(context)
File "/dir/anaconda3/lib/python3.7/site-packages/ipykernel/kernelapp.py", line 268, in init_iopub
self.iopub_thread = IOPubThread(self.iopub_socket, pipe=True)
File "/dir/anaconda3/lib/python3.7/site-packages/ipykernel/iostream.py", line 66, in __init__
self.io_loop = IOLoop(make_current=False)
File "/dir/ros_projects/forked/rosbridge_suite/rosbridge_server/src/tornado/util.py", line 208, in __new__
instance.initialize(**args)
File "/dir/ros_projects/forked/rosbridge_suite/rosbridge_server/src/tornado/platform/epoll.py", line 26, in initialize
super(EPollIOLoop, self).initialize(impl=select.epoll(), **kwargs)
TypeError: initialize() got an unexpected keyword argument 'make_current'
[W 10:56:57.665 NotebookApp] KernelRestarter: restart failed
[W 10:56:57.666 NotebookApp] Kernel 2dd183ff-850d-4f79-945c-c8f56f1e695e died, removing from map.
A little late, but answering my own question. PYTHONPATH was set for a bunch of other projects. Since conda doesn't set PYTHONPATH, running
unset PYTHONPATH
did the trick.

Categories

Resources