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

Having issue with specific symbols #5

Open
kazemivf opened this issue Feb 28, 2023 · 29 comments
Open

Having issue with specific symbols #5

kazemivf opened this issue Feb 28, 2023 · 29 comments

Comments

@kazemivf
Copy link

Hello,
This is my concrete grammar:
concrete Test111 of Test11 = {
lincat
Predicate = Str;
Expr = Str ;

lin
Not e1 = "not " ++ e1 ;
Element e1 e2 = e1 ++("is "|"is an element of "|" ∈ ") ++ e2 ;
Eq e1 e2 = e1 ++ (" is "|" = ") ++ e2 ;
Neq e1 e2 = e1 ++ " is not equal to " ++ e2 ;
Nelement e1 e2 = e1 ++ " is not an element of " ++ e2 ;
Gt e1 e2 = e1 ++ (" is greater than "| " > ") ++ e2;
Lt e1 e2 = e1 ++ (" is less than "|" < ") ++ e2;
Pair e1 e2 = "a pair with " ++ e1 ++ "and " ++ e2;
Relation e1 e2 = "a relation between " ++ e1 ++ " and " ++ e2 ;
TotalFunction e1 e2 = "a total function from " ++ e1 ++ "to " ++ e2;
PartialInject e1 e2 = "a partial injection"++" from " ++ e1 ++ "to " ++ e2|e1++" ⤔"++e2;
TotalSurj e1 e2 = "a total surjection from " ++ e1 ++ " to " ++ e2 ;
CartesianProd e1 e2 = "a cartesian product of " ++ e1 ++ "and " ++ e2|e1 ++" × "++e2;
Union e1 e2 = "a union of the sets " ++ e1 ++ "and " ++ e2;
DirectProd e1 e2 = "a direct product of " ++ e1 ++ "and " ++ e2 | e1 ++ "⊗" ++e2 ;
Interval e1 e2 = "between " ++ e1 ++ "and " ++ e2 ;
Add e1 e2 = e1 ++ (" plus " | " + ") ++ e2;
Sub e1 e2 = e1 ++ " - " ++ e2 ;
Mul e1 e2 = e1 ++ " * " ++ e2 ;
Neg e = "negation of " ++ e ;
Ident e1 = e1.s ;
IntegerLiteral e1 = e1.s ;
Expr2Pred t = t ;

}
For the inputs like : p -lang=1 "b + c" | l -treebank or p -lang=1 "b < c" | l -treebank, p -lang=1 "b = c" | l -treebank... I can get the correct output.
But for the inputs with the specific operators like : p -lang=1 "b ⊗ c" | l -treebank or p -lang=1 "b ⤔ c" | l -treebank, p -lang=1 "b ∈ c" | l -treebank... my code in Jupyter keeps running with no output.
image
Any idea how I can fix this issue?

@jfschaefer
Copy link
Member

I can't reproduce the problem. For me it works as expected:
image
But I use Linux (and don't have a Windows machine available for testing).
Do you have a minimal example that causes the problem?
Does the command line in which you started Jupyter show any error messages?

@kazemivf
Copy link
Author

kazemivf commented Mar 1, 2023

I use Windows and I think the problem is because of that.
About the examples: p -lang=1 "a ⤔ b" | l -treebank, p -lang=Formal "b ≠ a" | l -treebank, ... any operators except '+','-','=',...just keep running with no output.
This is the output from command line:
[IPKernelApp] ERROR | Exception in message handler:
Traceback (most recent call last):
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelbase.py", line 406, in dispatch_shell
await result
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelbase.py", line 721, in execute_request
reply_content = self.do_execute(
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\kernel.py", line 35, in do_execute
messages = self.GFRepl.handle_input(code)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 129, in handle_input
msg = self.handle_gf_command(cmd)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 67, in handle_gf_command
self.write_cmd(cmd)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 48, in write_cmd
self.gf_shell.stdin.write(cmd)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2260' in position 18: character maps to

jfschaefer added a commit that referenced this issue Mar 1, 2023
@jfschaefer
Copy link
Member

This seems to be a Windows-specific bug. Apparently it defaults to using the CP-1252 encoding.
Anyway, I now set it to UTF-8 and hope that it fixes the problem.
Can you pull the most recent version of the GF kernel and it install it to see if it works now?

@kazemivf
Copy link
Author

kazemivf commented Mar 1, 2023

I pulled the most recent version of the GF kernel and still it doesn't recognize specific symbols. But now it doesn't generate any output but stop running.
image

Is there a way that I manually change the related files?

@kazemivf
Copy link
Author

kazemivf commented Mar 1, 2023

Unlike before, it now halts during execution but without producing any output.

@jfschaefer
Copy link
Member

What happens if you try to parse (without linearization)?

@kazemivf
Copy link
Author

kazemivf commented Mar 1, 2023

For example for this command: p "a ⤔ b"
generates this error:
The parser failed at token 2: "\915\241\246"

@jfschaefer
Copy link
Member

Okay, I've tried to specify the encoding in more places. Could you please install the newest version one more time and see if it works now?

@kazemivf
Copy link
Author

kazemivf commented Mar 1, 2023

I got the new version, but the kernel doesn't work again, although I checked the line '22' (now is in line 21) in the file GFRepl and it references to the address of gf.exe. Did you add UTF-8 encoding to that line too? maybe that's why the gf kernel doesn't start again.

@jfschaefer
Copy link
Member

jfschaefer commented Mar 2, 2023

Ah, yes, I forgot that that's still an issue.
I added the encoding there as a command line argument to GF. It should have two arguments now: , '--run', '--coding=utf8', instead of just , '--run'.

@kazemivf
Copy link
Author

kazemivf commented Mar 2, 2023

Will you release the new update soon? I was using gf-kernel and after getting the new version the kernel stoped working.

@jfschaefer
Copy link
Member

I could undo the changes, but then the unicode symbols won't work.
What is your line 21 in GFRepl.py?
It should be something like

        self.gf_shell = Popen(('C:\\Users\\fatemeh\\gf-3.11-windows\\gf.exe', '--run', '--coding=utf8')

If it's that line and it doesn't work for you, then I will undo the changes and Unicode symbols unfortunately won't work on Windows until I find a different solution.

@jfschaefer
Copy link
Member

I've now managed to get Windows in VirtualBox and the most recent version does work for me there (assuming that line 21 in GFRepl is changed correctly)

@kazemivf
Copy link
Author

kazemivf commented Mar 3, 2023

This is the line number 21: self.gf_shell = Popen(('C:\Users\fatemeh\gf-3.11-windows\gf.exe', '--run', '--coding=utf8'),
stdin=PIPE,
stderr=self.pipe[1],
stdout=self.pipe[1],
text=True,
encoding='utf-8')

@kazemivf
Copy link
Author

kazemivf commented Mar 3, 2023

Did you release new updates?

@jfschaefer
Copy link
Member

The problem might be that you use single backslashes. Can you try 'C:\\Users\\fatemeh\\gf-3.11-windows\\gf.exe'?
I haven't released a new update because I think that this should work

@kazemivf
Copy link
Author

kazemivf commented Mar 3, 2023

I tried with single backslashes and it still doesn't work. I don't think backslashes make problem, since before kernel was working with double backslashes too.

@jfschaefer
Copy link
Member

I mean that in the line you copied, you used single backslashes. It has to be double backslashes.
If it doesn't work with double backslashes, what errors do you get in the command line where you run jupyter notebook?

@kazemivf
Copy link
Author

kazemivf commented Mar 3, 2023

I got the gf-kernel again, and tried with both single and double backslashes. Unfortunately doesn't work.
[W 11:01:02.658 NotebookApp] KernelRestarter: restart failed
[W 11:01:02.659 NotebookApp] Kernel f691a3da-3f76-4fbc-9a06-e001264b7049 died, removing from map.
[W 11:01:35.471 NotebookApp] Timeout waiting for kernel_info reply from f691a3da-3f76-4fbc-9a06-e001264b7049
[E 11:01:35.477 NotebookApp] Error opening stream: HTTP 404: Not Found (Kernel does not exist: f691a3da-3f76-4fbc-9a06-e001264b7049)
[W 11:01:36.517 NotebookApp] 404 GET /api/kernels/f691a3da-3f76-4fbc-9a06-e001264b7049/channels?session_id=8c0fbaca0364469dad77294673b270b0 (::1): Kernel does not exist: f691a3da-3f76-4fbc-9a06-e001264b7049
[W 11:01:36.523 NotebookApp] 404 GET /api/kernels/f691a3da-3f76-4fbc-9a06-e001264b7049/channels?session_id=8c0fbaca0364469dad77294673b270b0 (::1) 12.000000ms referer=None
[W 11:01:38.586 NotebookApp] 404 GET /api/kernels/f691a3da-3f76-4fbc-9a06-e001264b7049/channels?session_id=8c0fbaca0364469dad77294673b270b0 (::1): Kernel does not exist: f691a3da-3f76-4fbc-9a06-e001264b7049
[W 11:01:38.593 NotebookApp] 404 GET /api/kernels/f691a3da-3f76-4fbc-9a06-e001264b7049/channels?session_id=8c0fbaca0364469dad77294673b270b0 (::1) 16.010000ms referer=None
[W 11:01:42.639 NotebookApp] 404 GET /api/kernels/f691a3da-3f76-4fbc-9a06-e001264b7049/channels?session_id=8c0fbaca0364469dad77294673b270b0 (::1): Kernel does not exist: f691a3da-3f76-4fbc-9a06-e001264b7049
[W 11:01:42.643 NotebookApp] 404 GET /api/kernels/f691a3da-3f76-4fbc-9a06-e001264b7049/channels?session_id=8c0fbaca0364469dad77294673b270b0 (::1) 9.010000ms referer=None
[W 11:01:50.692 NotebookApp] 404 GET /api/kernels/f691a3da-3f76-4fbc-9a06-e001264b7049/channels?session_id=8c0fbaca0364469dad77294673b270b0 (::1): Kernel does not exist: f691a3da-3f76-4fbc-9a06-e001264b7049
[W 11:01:50.694 NotebookApp] 404 GET /api/kernels/f691a3da-3f76-4fbc-9a06-e001264b7049/channels?session_id=8c0fbaca0364469dad77294673b270b0 (::1) 3.990000ms referer=None

@kazemivf
Copy link
Author

kazemivf commented Mar 3, 2023

[I 11:08:34.028 NotebookApp] Serving notebooks from local directory: C:\Users\fatemeh
[I 11:08:34.028 NotebookApp] Jupyter Notebook 6.5.2 is running at:
[I 11:08:34.028 NotebookApp] http://localhost:8888/?token=cf2158a29bf4375c9e1053efb63a4b013a3dc460530d070d
[I 11:08:34.028 NotebookApp] or http://127.0.0.1:8888/?token=cf2158a29bf4375c9e1053efb63a4b013a3dc460530d070d
[I 11:08:34.028 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 11:08:34.082 NotebookApp]

To access the notebook, open this file in a browser:
    file:///C:/Users/fatemeh/AppData/Roaming/jupyter/runtime/nbserver-10460-open.html
Or copy and paste one of these URLs:
    http://localhost:8888/?token=cf2158a29bf4375c9e1053efb63a4b013a3dc460530d070d
 or http://127.0.0.1:8888/?token=cf2158a29bf4375c9e1053efb63a4b013a3dc460530d070d

[W 11:08:53.081 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20230303110833 (::1) 13.990000ms referer=http://localhost:8888/notebooks/anaconda3/Projects/GF.ipynb
[W 11:08:53.940 NotebookApp] 404 GET /static/components/codemirror/mode/gf/gf.js?v=20230303110833 (::1) 2.990000ms referer=http://localhost:8888/notebooks/anaconda3/Projects/GF.ipynb
[I 11:08:53.976 NotebookApp] Kernel started: 58bf20dd-54b0-4641-b165-d80b3d613204, name: gf
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel_main
.py", line 4, in
IPKernelApp.launch_instance(kernel_class=GFKernel)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 977, in launch_instance
app.initialize(argv)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 110, in inner
return method(app, *args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 681, in initialize
self.init_kernel()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 528, in init_kernel
kernel = kernel_factory(
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\configurable.py", line 551, in instance
inst = cls(*args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\kernel.py", line 31, in init
self.GFRepl = GFRepl()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 21, in init
self.gf_shell = Popen((find_executable('gf'), '--run', '--coding=utf8'),
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1251, in _execute_child
args = list2cmdline(args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 553, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType
[I 11:09:02.928 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel_main
.py", line 4, in
IPKernelApp.launch_instance(kernel_class=GFKernel)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 977, in launch_instance
app.initialize(argv)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 110, in inner
return method(app, *args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 681, in initialize
self.init_kernel()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 528, in init_kernel
kernel = kernel_factory(
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\configurable.py", line 551, in instance
inst = cls(*args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\kernel.py", line 31, in init
self.GFRepl = GFRepl()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 21, in init
self.gf_shell = Popen((find_executable('gf'), '--run', '--coding=utf8'),
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1251, in _execute_child
args = list2cmdline(args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 553, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType
[I 11:09:06.003 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel_main
.py", line 4, in
IPKernelApp.launch_instance(kernel_class=GFKernel)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 977, in launch_instance
app.initialize(argv)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 110, in inner
return method(app, *args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 681, in initialize
self.init_kernel()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 528, in init_kernel
kernel = kernel_factory(
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\configurable.py", line 551, in instance
inst = cls(*args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\kernel.py", line 31, in init
self.GFRepl = GFRepl()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 21, in init
self.gf_shell = Popen((find_executable('gf'), '--run', '--coding=utf8'),
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1251, in _execute_child
args = list2cmdline(args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 553, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType
[I 11:09:09.144 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel_main
.py", line 4, in
IPKernelApp.launch_instance(kernel_class=GFKernel)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 977, in launch_instance
app.initialize(argv)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 110, in inner
return method(app, *args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 681, in initialize
self.init_kernel()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 528, in init_kernel
kernel = kernel_factory(
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\configurable.py", line 551, in instance
inst = cls(*args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\kernel.py", line 31, in init
self.GFRepl = GFRepl()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 21, in init
self.gf_shell = Popen((find_executable('gf'), '--run', '--coding=utf8'),
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1251, in _execute_child
args = list2cmdline(args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 553, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType
[I 11:09:12.296 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel_main
.py", line 4, in
IPKernelApp.launch_instance(kernel_class=GFKernel)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 977, in launch_instance
app.initialize(argv)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 110, in inner
return method(app, *args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 681, in initialize
self.init_kernel()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 528, in init_kernel
kernel = kernel_factory(
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\configurable.py", line 551, in instance
inst = cls(*args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\kernel.py", line 31, in init
self.GFRepl = GFRepl()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 21, in init
self.gf_shell = Popen((find_executable('gf'), '--run', '--coding=utf8'),
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1251, in _execute_child
args = list2cmdline(args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 553, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType
[I 11:09:15.426 NotebookApp] KernelRestarter: restarting kernel (5/5), new random ports
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel_main
.py", line 4, in
IPKernelApp.launch_instance(kernel_class=GFKernel)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 977, in launch_instance
app.initialize(argv)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 110, in inner
return method(app, *args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 681, in initialize
self.init_kernel()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 528, in init_kernel
kernel = kernel_factory(
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\configurable.py", line 551, in instance
inst = cls(*args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\kernel.py", line 31, in init
self.GFRepl = GFRepl()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 21, in init
self.gf_shell = Popen((find_executable('gf'), '--run', '--coding=utf8'),
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1251, in _execute_child
args = list2cmdline(args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 553, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType
[W 11:09:18.560 NotebookApp] KernelRestarter: restart failed
[W 11:09:18.560 NotebookApp] Kernel 58bf20dd-54b0-4641-b165-d80b3d613204 died, removing from map.
[W 11:09:54.230 NotebookApp] Timeout waiting for kernel_info reply from 58bf20dd-54b0-4641-b165-d80b3d613204
[E 11:09:54.234 NotebookApp] Error opening stream: HTTP 404: Not Found (Kernel does not exist: 58bf20dd-54b0-4641-b165-d80b3d613204)
[W 11:09:55.283 NotebookApp] 404 GET /api/kernels/58bf20dd-54b0-4641-b165-d80b3d613204/channels?session_id=44b369b060dc4fe487c2528c1e81aed6 (::1): Kernel does not exist: 58bf20dd-54b0-4641-b165-d80b3d613204
[W 11:09:55.289 NotebookApp] 404 GET /api/kernels/58bf20dd-54b0-4641-b165-d80b3d613204/channels?session_id=44b369b060dc4fe487c2528c1e81aed6 (::1) 11.000000ms referer=None
[W 11:09:57.332 NotebookApp] 404 GET /api/kernels/58bf20dd-54b0-4641-b165-d80b3d613204/channels?session_id=44b369b060dc4fe487c2528c1e81aed6 (::1): Kernel does not exist: 58bf20dd-54b0-4641-b165-d80b3d613204
[W 11:09:57.337 NotebookApp] 404 GET /api/kernels/58bf20dd-54b0-4641-b165-d80b3d613204/channels?session_id=44b369b060dc4fe487c2528c1e81aed6 (::1) 12.980000ms referer=None
[W 11:10:01.371 NotebookApp] 404 GET /api/kernels/58bf20dd-54b0-4641-b165-d80b3d613204/channels?session_id=44b369b060dc4fe487c2528c1e81aed6 (::1): Kernel does not exist: 58bf20dd-54b0-4641-b165-d80b3d613204
[W 11:10:01.376 NotebookApp] 404 GET /api/kernels/58bf20dd-54b0-4641-b165-d80b3d613204/channels?session_id=44b369b060dc4fe487c2528c1e81aed6 (::1) 12.990000ms referer=None
[W 11:10:09.404 NotebookApp] 404 GET /api/kernels/58bf20dd-54b0-4641-b165-d80b3d613204/channels?session_id=44b369b060dc4fe487c2528c1e81aed6 (::1): Kernel does not exist: 58bf20dd-54b0-4641-b165-d80b3d613204
[W 11:10:09.410 NotebookApp] 404 GET /api/kernels/58bf20dd-54b0-4641-b165-d80b3d613204/channels?session_id=44b369b060dc4fe487c2528c1e81aed6 (::1) 8.010000ms referer=None

@jfschaefer
Copy link
Member

Ah, in the error messages it shows that line 21 wasn't update:
self.gf_shell = Popen((find_executable('gf'), '--run', '--coding=utf8')
Did you run
python3 -m install .
in the gf_kernel directory and then
python3 -m gf_kernel.install?
My guess is that you forget one of those (happens to me all the time)

@kazemivf
Copy link
Author

kazemivf commented Mar 3, 2023

I got it with these commands:
git clone https://github.com/kwarc/gf_kernel
cd gf_kernel
pip install .
Should I run any other commands?

@jfschaefer
Copy link
Member

Yes, one more: python3 -m gf_kernel.install

@kazemivf
Copy link
Author

kazemivf commented Mar 3, 2023

I did. But nothing changed.

[I 11:28:10.092 NotebookApp] Kernel started: 058029e6-7fdc-421b-99be-cc06ebfd3fa3, name: gf
[W 11:28:10.117 NotebookApp] 404 GET /static/components/codemirror/mode/gf/gf.js?v=20230303112753 (::1) 19.000000ms referer=http://localhost:8888/notebooks/anaconda3/Projects/GF.ipynb
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel_main
.py", line 4, in
IPKernelApp.launch_instance(kernel_class=GFKernel)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 977, in launch_instance
app.initialize(argv)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 110, in inner
return method(app, *args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 681, in initialize
self.init_kernel()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 528, in init_kernel
kernel = kernel_factory(
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\configurable.py", line 551, in instance
inst = cls(*args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\kernel.py", line 31, in init
self.GFRepl = GFRepl()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 21, in init
self.gf_shell = Popen((find_executable('gf'), '--run', '--coding=utf8'),
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1251, in _execute_child
args = list2cmdline(args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 553, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType
[I 11:28:13.077 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel_main
.py", line 4, in
IPKernelApp.launch_instance(kernel_class=GFKernel)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 977, in launch_instance
app.initialize(argv)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 110, in inner
return method(app, *args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 681, in initialize
self.init_kernel()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 528, in init_kernel
kernel = kernel_factory(
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\configurable.py", line 551, in instance
inst = cls(*args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\kernel.py", line 31, in init
self.GFRepl = GFRepl()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 21, in init
self.gf_shell = Popen((find_executable('gf'), '--run', '--coding=utf8'),
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1251, in _execute_child
args = list2cmdline(args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 553, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType
[I 11:28:16.180 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel_main
.py", line 4, in
IPKernelApp.launch_instance(kernel_class=GFKernel)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 977, in launch_instance
app.initialize(argv)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 110, in inner
return method(app, *args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 681, in initialize
self.init_kernel()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 528, in init_kernel
kernel = kernel_factory(
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\configurable.py", line 551, in instance
inst = cls(*args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\kernel.py", line 31, in init
self.GFRepl = GFRepl()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 21, in init
self.gf_shell = Popen((find_executable('gf'), '--run', '--coding=utf8'),
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1251, in _execute_child
args = list2cmdline(args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 553, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType
[I 11:28:19.302 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel_main
.py", line 4, in
IPKernelApp.launch_instance(kernel_class=GFKernel)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 977, in launch_instance
app.initialize(argv)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 110, in inner
return method(app, *args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 681, in initialize
self.init_kernel()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 528, in init_kernel
kernel = kernel_factory(
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\configurable.py", line 551, in instance
inst = cls(*args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\kernel.py", line 31, in init
self.GFRepl = GFRepl()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 21, in init
self.gf_shell = Popen((find_executable('gf'), '--run', '--coding=utf8'),
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1251, in _execute_child
args = list2cmdline(args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 553, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType
[I 11:28:22.381 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel_main
.py", line 4, in
IPKernelApp.launch_instance(kernel_class=GFKernel)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 977, in launch_instance
app.initialize(argv)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 110, in inner
return method(app, *args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 681, in initialize
self.init_kernel()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 528, in init_kernel
kernel = kernel_factory(
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\configurable.py", line 551, in instance
inst = cls(*args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\kernel.py", line 31, in init
self.GFRepl = GFRepl()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 21, in init
self.gf_shell = Popen((find_executable('gf'), '--run', '--coding=utf8'),
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1251, in _execute_child
args = list2cmdline(args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 553, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType
[W 11:28:25.487 NotebookApp] KernelRestarter: restart failed
[W 11:28:25.489 NotebookApp] Kernel 058029e6-7fdc-421b-99be-cc06ebfd3fa3 died, removing from map.
[E 11:28:40.685 NotebookApp] Exception restarting kernel
Traceback (most recent call last):
File "C:\Users\fatemeh\anaconda3\lib\site-packages\notebook\services\kernels\handlers.py", line 89, in post
yield maybe_future(km.restart_kernel(kernel_id))
File "C:\Users\fatemeh\anaconda3\lib\site-packages\tornado\gen.py", line 762, in run
value = future.result()
File "C:\Users\fatemeh\anaconda3\lib\asyncio\futures.py", line 201, in result
raise self._exception
File "C:\Users\fatemeh\anaconda3\lib\asyncio\tasks.py", line 256, in __step
result = coro.send(None)
File "C:\Users\fatemeh\anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 313, in restart_kernel
self._check_kernel_id(kernel_id)
File "C:\Users\fatemeh\anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 394, in _check_kernel_id
raise web.HTTPError(404, u'Kernel does not exist: %s' % kernel_id)
tornado.web.HTTPError: HTTP 404: Not Found (Kernel does not exist: 058029e6-7fdc-421b-99be-cc06ebfd3fa3)
[E 11:28:40.698 NotebookApp] {
"Host": "localhost:8888",
"Connection": "keep-alive",
"Content-Length": "0",
"Sec-Ch-Ua": ""Chromium";v="110", "Not A(Brand";v="24", "Microsoft Edge";v="110"",
"Accept": "application/json, text/javascript, /; q=0.01",
"X-Requested-With": "XMLHttpRequest",
"X-Xsrftoken": "2|899c92a5|d3362aca59bda9cfdb5773a2976a547f|1675372119",
"Sec-Ch-Ua-Mobile": "?0",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.57",
"Sec-Ch-Ua-Platform": ""Windows"",
"Origin": "http://localhost:8888",
"Sec-Fetch-Site": "same-origin",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Dest": "empty",
"Referer": "http://localhost:8888/notebooks/anaconda3/Projects/GF.ipynb",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "en-US,en;q=0.9",
"Cookie": "_xsrf=2|899c92a5|d3362aca59bda9cfdb5773a2976a547f|1675372119; username-localhost-8817="2|1:0|10:1675372347|23:username-localhost-8817|44:NzdjM2FkMWI0ZWIzNDIyOTg0NDk5MTBlM2VmMDE1YjI=|4851e463a9989c1e4cb08bde8cb8e097f594334a74fe549e475a11aa5fce892f"; username-localhost-8904="2|1:0|10:1675375231|23:username-localhost-8904|44:NDZjZjc2MDY1MzEyNGE2ZTgwZGEwODUwOTZlYzFkY2E=|81191f517304be5da73940c513ffc4b47141ce2005f44b97237ac7dadf58cfe1"; username-localhost-8823="2|1:0|10:1675442249|23:username-localhost-8823|44:MzkyMjA0MGQ0Y2JlNDQ4ZWJiMzNkYjdmMDdjNmVkOTU=|39d5179abb7cf6fb792442b86dd5cb9e7f74ad9a6e0fec939133539b6cd5b975"; username-localhost-8879="2|1:0|10:1675867320|23:username-localhost-8879|44:YmY1MTVhMGU3MmQ1NDFhOTk0MmQzMzBmMGNlNTAxMjE=|a565422e97d9e9f2d2b4ae7dd5cf355fb9cf00a10f0a03ca90fcde865feac58e"; username-localhost-8927="2|1:0|10:1675963899|23:username-localhost-8927|44:ZjIyYjI4NWY0ZWFmNDBmOGFjNzNiMTI3ZWI2MDVjZTk=|4ff52a123e10e95d4ec72c1ddf9d01e677be45a659dbbf2087643dc1ea275826"; username-localhost-8891="2|1:0|10:1676589233|23:username-localhost-8891|44:M2YxNWZlMGU5NGVkNGRiOGJhM2ExZDdiYzUxYjEwZGE=|0bff1733b2a384dacec459a368b51d504f402c1e0883d0a5f4234f8b9e0419ec"; username-localhost-8983="2|1:0|10:1676667025|23:username-localhost-8983|44:ZTQwNzdhNWUyMjFlNGQ1Y2IyOWNiMTYzZTY5ODUzYjM=|83de171f44be645fd4322f3612fe7223a092d30d7740c3f1ee7c198ade416463"; username-localhost-8892="2|1:0|10:1676674400|23:username-localhost-8892|44:Y2MzODRjYTQxZTAyNDMyMGE3MzY5YTMzOWJhZWU3ZTA=|afbbaa39879ff45c5ea1cdd19b1aa1806536f5b82caa78b5c1c4d5cfd63792f5"; username-localhost-8890="2|1:0|10:1677858705|23:username-localhost-8890|44:ZjA3ZWI0MDkyN2ZmNGQ0MDk2MTNlYzlmMWFiODdlYjI=|2f6d326f7fbb88cf05c154e2e41fb285b0bf5b193771eb9dc0949cd3732351d3"; username-localhost-8889="2|1:0|10:1677860677|23:username-localhost-8889|44:YzY5ODNjMmYxMDEyNDNhYmI5NzVmZmYwOWYwZGZkZWI=|40b74bd6ff40a9280687384263392465394e1730677cee59a654e4cd3b8db3df"; username-localhost-8888="2|1:0|10:1677860876|23:username-localhost-8888|44:ZGJlMzQ0YTI5YWFmNDFlOWE0Yjc5MGY3YzI4ZDE1YmM=|2e7216c2ea475da5e4de660eefe3d3b93fec4f569d103d3f4e43383b15f2bd6b""
}
[E 11:28:40.702 NotebookApp] 500 POST /api/kernels/058029e6-7fdc-421b-99be-cc06ebfd3fa3/restart (::1) 14.040000ms referer=http://localhost:8888/notebooks/anaconda3/Projects/GF.ipynb
[W 11:28:40.706 NotebookApp] 404 DELETE /api/sessions/1635d3d7-5cf3-4dde-a097-d379265bb290 (::1): Session not found: session_id='1635d3d7-5cf3-4dde-a097-d379265bb290'
[W 11:28:40.706 NotebookApp] Session not found: session_id='1635d3d7-5cf3-4dde-a097-d379265bb290'
[W 11:28:40.707 NotebookApp] 404 DELETE /api/sessions/1635d3d7-5cf3-4dde-a097-d379265bb290 (::1) 2.000000ms referer=http://localhost:8888/notebooks/anaconda3/Projects/GF.ipynb
[I 11:28:40.773 NotebookApp] Kernel started: 0b684fab-b90c-461b-97df-2a249f27f5fe, name: gf
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel_main
.py", line 4, in
IPKernelApp.launch_instance(kernel_class=GFKernel)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 977, in launch_instance
app.initialize(argv)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 110, in inner
return method(app, *args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 681, in initialize
self.init_kernel()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 528, in init_kernel
kernel = kernel_factory(
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\configurable.py", line 551, in instance
inst = cls(*args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\kernel.py", line 31, in init
self.GFRepl = GFRepl()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 21, in init
self.gf_shell = Popen((find_executable('gf'), '--run', '--coding=utf8'),
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1251, in _execute_child
args = list2cmdline(args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 553, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType
[I 11:28:43.772 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel_main
.py", line 4, in
IPKernelApp.launch_instance(kernel_class=GFKernel)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 977, in launch_instance
app.initialize(argv)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 110, in inner
return method(app, *args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 681, in initialize
self.init_kernel()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 528, in init_kernel
kernel = kernel_factory(
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\configurable.py", line 551, in instance
inst = cls(*args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\kernel.py", line 31, in init
self.GFRepl = GFRepl()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 21, in init
self.gf_shell = Popen((find_executable('gf'), '--run', '--coding=utf8'),
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1251, in _execute_child
args = list2cmdline(args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 553, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType
[I 11:28:46.853 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel_main
.py", line 4, in
IPKernelApp.launch_instance(kernel_class=GFKernel)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 977, in launch_instance
app.initialize(argv)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 110, in inner
return method(app, *args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 681, in initialize
self.init_kernel()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 528, in init_kernel
kernel = kernel_factory(
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\configurable.py", line 551, in instance
inst = cls(*args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\kernel.py", line 31, in init
self.GFRepl = GFRepl()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 21, in init
self.gf_shell = Popen((find_executable('gf'), '--run', '--coding=utf8'),
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1251, in _execute_child
args = list2cmdline(args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 553, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType
[I 11:28:49.951 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel_main
.py", line 4, in
IPKernelApp.launch_instance(kernel_class=GFKernel)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 977, in launch_instance
app.initialize(argv)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 110, in inner
return method(app, *args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 681, in initialize
self.init_kernel()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 528, in init_kernel
kernel = kernel_factory(
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\configurable.py", line 551, in instance
inst = cls(*args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\kernel.py", line 31, in init
self.GFRepl = GFRepl()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 21, in init
self.gf_shell = Popen((find_executable('gf'), '--run', '--coding=utf8'),
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1251, in _execute_child
args = list2cmdline(args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 553, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType
[I 11:28:53.072 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel_main
.py", line 4, in
IPKernelApp.launch_instance(kernel_class=GFKernel)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 977, in launch_instance
app.initialize(argv)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\application.py", line 110, in inner
return method(app, *args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 681, in initialize
self.init_kernel()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\ipykernel\kernelapp.py", line 528, in init_kernel
kernel = kernel_factory(
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\traitlets\config\configurable.py", line 551, in instance
inst = cls(*args, **kwargs)
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\kernel.py", line 31, in init
self.GFRepl = GFRepl()
File "C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py", line 21, in init
self.gf_shell = Popen((find_executable('gf'), '--run', '--coding=utf8'),
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1251, in _execute_child
args = list2cmdline(args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 553, in list2cmdline
for arg in map(os.fsdecode, seq):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of filename.
TypeError: expected str, bytes or os.PathLike object, not NoneType
[W 11:28:56.162 NotebookApp] KernelRestarter: restart failed
[W 11:28:56.163 NotebookApp] Kernel 0b684fab-b90c-461b-97df-2a249f27f5fe died, removing from map.
[W 11:29:10.136 NotebookApp] Timeout waiting for kernel_info reply from 058029e6-7fdc-421b-99be-cc06ebfd3fa3
[E 11:29:10.140 NotebookApp] Error opening stream: HTTP 404: Not Found (Kernel does not exist: 058029e6-7fdc-421b-99be-cc06ebfd3fa3)
[W 11:29:11.188 NotebookApp] Replacing stale connection: 0b684fab-b90c-461b-97df-2a249f27f5fe:f8a1ff4324b44c55851df70a425864fb

@jfschaefer
Copy link
Member

Somehow the installed kernel does not get updated. Maybe you have different python installations and it gets installed for the wrong one.
The other option would be that you open the file C:\Users\fatemeh\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\gf_kernel\GFRepl.py and change line 21 there.

@kazemivf
Copy link
Author

kazemivf commented Mar 3, 2023

I changed the GFRepl in the address you mentioned. Now the Kernel works but still can not detect the operators. Thank you for your help, may be it's better to use the text editors to write my gf codes and run them in the gf shell, since operators can be recognized there.

@kazemivf
Copy link
Author

kazemivf commented Mar 3, 2023

In between yes, I have two python installation.

@jfschaefer
Copy link
Member

That's a pity - but then running them in the GF shell might really be the better option. I thought it would work now.
I'll let you know if I find any other ways to make it work with the Jupyter kernel.

@kazemivf
Copy link
Author

kazemivf commented Mar 3, 2023

Thank you!

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

2 participants