Closed
Description
When I run treon
I get a RuntimeError telling me that it can only launch a kernel on a local interface.
The error message suggests to me that something is wrong with my configuration settings, but I had expected since I don't see this error when I run ipython
or jupyter notebook
then I also shouldn't see it when I run treon
.
Details
- Windows 10
- Python 3.7
- treon master branch
I made a new (conda) virtual environment to install the treon master branch into, with pip install -r requirements-dev.txt
and pip install -e .
Here's the output when I run treon on the example notebooks included with the repository:
(treon-dev) C:\Users\Genevieve\Documents\GitHub\treon>treon
Executing treon version 0.1.3
Recursively scanning C:\Users\Genevieve\Documents\GitHub\treon for notebooks...
Triggered test for C:\Users\Genevieve\Documents\GitHub\treon\tests\resources\basic.ipynb
Triggered test for C:\Users\Genevieve\Documents\GitHub\treon\tests\resources\doctest_failed.ipynb
Triggered test for C:\Users\Genevieve\Documents\GitHub\treon\tests\resources\runtime_error.ipynb
Triggered test for C:\Users\Genevieve\Documents\GitHub\treon\tests\resources\unittest_failed.ipynb
ERROR in testing C:\Users\Genevieve\Documents\GitHub\treon\tests\resources\runtime_error.ipynb
An error occurred while executing the following cell:
------------------
1 / 0
------------------
�[1;31m---------------------------------------------------------------------------�[0m
�[1;31mZeroDivisionError�[0m Traceback (most recent call last)
�[1;32m<ipython-input-1-bc757c3fda29>�[0m in �[0;36m<module>�[1;34m�[0m
�[1;32m----> 1�[1;33m �[1;36m1�[0m �[1;33m/�[0m �[1;36m0�[0m�[1;33m�[0m�[1;33m�[0m�[0m
�[0m
�[1;31mZeroDivisionError�[0m: division by zero
ZeroDivisionError: division by zero
Traceback (most recent call last):
File "C:\Users\Genevieve\anaconda3\envs\treon-dev\Scripts\treon-script.py", line 33, in <module>
sys.exit(load_entry_point('treon', 'console_scripts', 'treon')())
File "c:\users\genevieve\documents\github\treon\treon\treon.py", line 52, in main
trigger_tasks(tasks, thread_count)
File "c:\users\genevieve\documents\github\treon\treon\treon.py", line 71, in trigger_tasks
pool.map(Task.run_tests, tasks)
File "C:\Users\Genevieve\anaconda3\envs\treon-dev\lib\multiprocessing\pool.py", line 268, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "C:\Users\Genevieve\anaconda3\envs\treon-dev\lib\multiprocessing\pool.py", line 657, in get
raise self._value
File "C:\Users\Genevieve\anaconda3\envs\treon-dev\lib\multiprocessing\pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "C:\Users\Genevieve\anaconda3\envs\treon-dev\lib\multiprocessing\pool.py", line 44, in mapstar
return list(map(*args))
File "c:\users\genevieve\documents\github\treon\treon\task.py", line 25, in run_tests
self.is_successful, console_output = execute_notebook(self.file_path)
File "c:\users\genevieve\documents\github\treon\treon\test_execution.py", line 13, in execute_notebook
processor.preprocess(notebook, metadata(path))
File "C:\Users\Genevieve\anaconda3\envs\treon-dev\lib\site-packages\nbconvert\preprocessors\execute.py", line 79, in preprocess
self.execute()
File "C:\Users\Genevieve\anaconda3\envs\treon-dev\lib\site-packages\nbclient\util.py", line 74, in wrapped
return just_run(coro(*args, **kwargs))
File "C:\Users\Genevieve\anaconda3\envs\treon-dev\lib\site-packages\nbclient\util.py", line 53, in just_run
return loop.run_until_complete(coro)
File "C:\Users\Genevieve\anaconda3\envs\treon-dev\lib\asyncio\base_events.py", line 587, in run_until_complete
return future.result()
File "C:\Users\Genevieve\anaconda3\envs\treon-dev\lib\site-packages\nbclient\client.py", line 519, in async_execute
async with self.async_setup_kernel(**kwargs):
File "C:\Users\Genevieve\anaconda3\envs\treon-dev\lib\site-packages\async_generator\_util.py", line 34, in __aenter__
return await self._agen.asend(None)
File "C:\Users\Genevieve\anaconda3\envs\treon-dev\lib\site-packages\nbclient\client.py", line 477, in async_setup_kernel
await self.async_start_new_kernel(**kwargs)
File "C:\Users\Genevieve\anaconda3\envs\treon-dev\lib\site-packages\nbclient\client.py", line 389, in async_start_new_kernel
await ensure_async(self.km.start_kernel(extra_arguments=self.extra_arguments, **kwargs))
File "C:\Users\Genevieve\anaconda3\envs\treon-dev\lib\site-packages\nbclient\util.py", line 85, in ensure_async
result = await obj
File "C:\Users\Genevieve\anaconda3\envs\treon-dev\lib\site-packages\jupyter_client\manager.py", line 571, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File "C:\Users\Genevieve\anaconda3\envs\treon-dev\lib\site-packages\jupyter_client\manager.py", line 252, in pre_start_kernel
"Currently valid addresses are: %s" % (self.ip, local_ips())
RuntimeError: Can only launch a kernel on a local interface. This one is not: 127.0.0.1.Make sure that the '*_address' attributes are configured properly. Currently valid addresses are: ['49.127.90.25', '172.28.70.145', '192.168.56.1', '192.168.1.103', '192.168.137.1', '172.22.0.1', '0.0.0.0', '']
(treon-dev) C:\Users\Genevieve\Documents\GitHub\treon>
Things I've tried:
- Calling treon with an
--ip=
keyword argument, the same way you might if you ran either ipython or jupyter directory (perhaps unsuprisingly, this isn't supported by treon) - Generating a jupyter config file with 'jupyter notebook --generate-config' and editing 'c.NotebookApp.ip' and 'c.NotebookApp.allow_origin', as suggested in this stackoverflow thread
Metadata
Metadata
Assignees
Labels
No labels