-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Kernel error: jupyter_client/connect.py AssertionError #4937
Comments
UpdateIt turns out that the newest version of Installing the previous version of jupyter_client via following command fixes this issue:
|
The
The downgrade to 5.3.1 proposed by @dahjan worked for me as well. This means that the bug was introduced in 5.3.3 and remains in 5.3.4. @dahjan - please reopen the issue - downgrading the pkg is just a temp workaround, and we need a future-proof solution. Appeal to the developers: please remove BOTH broken versions of jupyter_client (5.3.4 and 5.3.3) from BOTH pypi and Anaconda's conda-forge channel. More info I suspect the bug will be a long-lasting one because client-server connections to python 3.6 kernels in Jupyter Notebook and Lab work under some circumstances. For instance, they work correctly under My suspicion is confirmed by the fact that it now applies to TWO historical versions of |
Hi @mirekphd - I'm sorry about the inconvenience. The latest release of jupyter_client (5.3.4) did two things.
I agree that there is likely a non-win32 issue here relative to the "old" statement you show from jupyter_client. However, that particular statement is no longer an assertion, but a raise with a detailed message containing the current permissions - which would prove extremely helpful in this particular case. Could you please confirm that you're using the true latest versions of each library and try again so that we can gain access to what the permissions happen to be on this particular platform? cc: @MSeal |
Can you clarify again which libraries? I understand |
|
I made some comments on the original PR that caused this issue. It is still happening in all the latest docker images in the Jupyter project (build 1 month ago.) I have to add: RUN conda install --yes jupyter_client==5.3.1 in all my Dockerfiles. |
So is an updated |
Yes, my issue is related to Azurefile cifs filesystem permissions. There has been some work to solve the issue in Jupyter core which resulted in 4.6.1 allowing execute bit on owner. CIF mounts are setting the execute bit on owner which is difficult to prevent. I am now looking at trying to change some mount options related to group and world which came as default with jupyterhub azurefile storage type I am using. |
After downgrading
Tried to upgrade to the most recent as suggested here, but arrived back here: $> conda update jupyter_client
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.8.4
latest version: 4.9.2
Please update conda by running
$ conda update -n base conda
## Package Plan ##
environment location: /home/a114383/miniconda3/envs/pfft
added / updated specs:
- jupyter_client
The following packages will be UPDATED:
jupyter_client 5.3.1-py_0 --> 6.1.11-pyhd8ed1ab_1
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
$> jupyter lab --port=18777
[I 2021-01-12 16:19:57.398 ServerApp] jupyterlab | extension was successfully linked.
[I 2021-01-12 16:19:58.239 ServerApp] nbclassic | extension was successfully linked.
[I 2021-01-12 16:19:58.459 LabApp] JupyterLab extension loaded from /home/a114383/miniconda3/envs/pfft/lib/python3.6/site-packages/jupyterlab
[I 2021-01-12 16:19:58.459 LabApp] JupyterLab application directory is /home/a114383/miniconda3/envs/pfft/share/jupyter/lab
[I 2021-01-12 16:19:58.464 ServerApp] jupyterlab | extension was successfully loaded.
[I 2021-01-12 16:19:58.476 ServerApp] nbclassic | extension was successfully loaded.
[I 2021-01-12 16:19:58.476 ServerApp] Serving notebooks from local directory: /home/a114383/PLP-PFFT
[I 2021-01-12 16:19:58.476 ServerApp] Jupyter Server 1.2.1 is running at:
[I 2021-01-12 16:19:58.476 ServerApp] http://localhost:18777/lab?token=0ba569d54d0c2e662ec88e17dfbd09896cef10f7c054f089
[I 2021-01-12 16:19:58.476 ServerApp] or http://127.0.0.1:18777/lab?token=0ba569d54d0c2e662ec88e17dfbd09896cef10f7c054f089
[I 2021-01-12 16:19:58.476 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Traceback (most recent call last):
File "/home/a114383/miniconda3/envs/pfft/bin/jupyter-lab", line 8, in <module>
sys.exit(main())
File "/home/a114383/miniconda3/envs/pfft/lib/python3.6/site-packages/jupyter_server/extension/application.py", line 504, in launch_instance
serverapp.start()
File "/home/a114383/miniconda3/envs/pfft/lib/python3.6/site-packages/jupyter_server/serverapp.py", line 1972, in start
self.start_app()
File "/home/a114383/miniconda3/envs/pfft/lib/python3.6/site-packages/jupyter_server/serverapp.py", line 1933, in start_app
self.write_server_info_file()
File "/home/a114383/miniconda3/envs/pfft/lib/python3.6/site-packages/jupyter_server/serverapp.py", line 1823, in write_server_info_file
with secure_write(self.info_file) as f:
File "/home/a114383/miniconda3/envs/pfft/lib/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/home/a114383/miniconda3/envs/pfft/lib/python3.6/site-packages/jupyter_server/utils.py", line 291, in secure_write
assert '0600' == oct(stat.S_IMODE(os.stat(fname).st_mode)).replace('0o', '0')
AssertionError |
Hi @a114383 - updating I suspect you'd be able to simulate that error by attempting to run I will open a new issue in jupyter_server regarding my previous comment. |
Thanks @kevin-bates - Looks like I can run |
Thanks for the update @a114383 - that is very helpful. I'm curious why you didn't encounter the same security-related error when running against the notebook server. Are you setting the env I suspect you'd be able to run lab using a release < 3.x since it's only the 3.x releases that rely on jupyter_server. That said, we could probably get a jupyter_server release built that uses the core library for this relatively soon. |
Having similar issue here is the doc file i included everything in details please have a look at it and respond please really struggling for past few days |
Hi @anupsaha1 - this is a different issue related |
|
thanks mate
…Sent from my Mi phone
Jan 25, 2022 12:11 AM wrote on Kevin Bates ***@***.***>:
Hi @anupsaha1<https://github.com/anupsaha1> - this is a different issue related pyzmq on Windows. Please see this issue for guidance: zeromq/pyzmq#1505<zeromq/pyzmq#1505>.
—
Reply to this email directly, view it on GitHub<#4937 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ARDNBUX3UXTE3BXBWPSGSK3UXV22JANCNFSM4I4YBOBA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Glad to hear you're moving forward @anupsaha1. I'm going to close this issue since the original issue is referring to a source code location that has since been moved and seems to be addressed, and the issue is starting to splinter into unrelated areas. |
I'm still getting the same error even after downgrading
|
Hi @sugamkarki - this appears to be unrelated to other issues in this thread. Yes, it's an assertion error, but that's about the only relationship. I don't think downgrading This smells like a Windows event loop issue to me. Instead, I would make sure you're running the latest |
@kevin-bates I've recreated the env with |
Thank you for the version information.
Probably so. However, the issue should be filed in https://github.com/ipython/ipykernel/issues since that's where the application ( |
Error message
Traceback (most recent call last):
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/web.py", line 1699, in _execute
result = await result
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/home/djan/anaconda3/lib/python3.7/site-packages/notebook/services/sessions/handlers.py", line 72, in post
type=mtype))
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/home/djan/anaconda3/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 88, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "/home/djan/anaconda3/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 101, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
value = future.result()
File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 209, in wrapper
yielded = next(result)
File "/home/djan/anaconda3/lib/python3.7/site-packages/notebook/services/kernels/kernelmanager.py", line 168, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/manager.py", line 240, in start_kernel
self.write_connection_file()
File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/connect.py", line 547, in write_connection_file
kernel_name=self.kernel_name
File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/connect.py", line 212, in write_connection_file
with secure_write(fname) as f:
File "/home/djan/anaconda3/lib/python3.7/contextlib.py", line 112, in enter
return next(self.gen)
File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/connect.py", line 105, in secure_write
assert '0600' == oct(stat.S_IMODE(os.stat(fname).st_mode)).replace('0o', '0')
AssertionError
System information
Running Jupyter (v. 1.0.0) on a Linux server, with anaconda3 (v. 2019.07) 64-bit.
Available Kernels
Available kernels:
python3 /home/djan/.local/share/jupyter/kernels/python3
nn /home/djan/.local/share/jupyter/kernels/nn
Reproducing the issue
conda create -n test python=3.7
conda install -c anaconda jupyter
What I tried so far
There seems to be an issue with file permissions when running Jupyter on a server inside a Conda environment. I tried to give all files inside my anaconda3 folder the requested permissions (0600), but this did not help.
The text was updated successfully, but these errors were encountered: