Spyder ipython console throws "An error ocurred while starting the kernel" when restarting kernel

Description
When restarting ipython kernel or opening a new ipython console session within Spyder, it crashes. Below is the error message. However, the very first ipython console session that get's opened by Spyder, does work. I have reinstalled anaconda  with a fresh new download but the problem keeps appearing.
An error ocurred while starting the kernel
Error in sitecustomize; set PYTHONVERBOSE for traceback:
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
File "/Users/asierberra/anaconda/lib/python3.5/site‑packages/spyderlib/widgets/externalshell/start_ipython_kernel.py", line 183, in
from IPython.kernel.zmq.kernelapp import IPKernelApp
File "/Users/asierberra/anaconda/lib/python3.5/site‑packages/IPython/__init__.py", line 48, in
from .terminal.embed import embed
File "/Users/asierberra/anaconda/lib/python3.5/site‑packages/IPython/terminal/embed.py", line 16, in
from IPython.core.interactiveshell import DummyMod
File "/Users/asierberra/anaconda/lib/python3.5/site‑packages/IPython/core/interactiveshell.py", line 31, in
from pickleshare import PickleShareDB
File "/Users/asierberra/anaconda/lib/python3.5/site‑packages/pickleshare.py", line 41, in
from path import path as Path
File "/Users/asierberra/anaconda/lib/python3.5/site‑packages/path.py", line 123, in
__version__ = pkg_resources.require('path.py')[0].version
TypeError: 'NoneType' object is not callable

What steps will reproduce the problem?

Open spyder and work in ipython consol
Open a new ipython console tab, or restart current kernel

What is the expected output? What do you see instead?
Please provide any additional information below
Version and main components

Spyder Version: 2.3.7
Python Version: 3.5.0
Qt Versions:  4.8.7, PyQt4 (API v2) 4.11.4 on Darwin
OsX 10.11.1

Optional dependencies
pyflakes >=0.6.0   :  1.0.0 (OK)
pep8 >=0.6         :  1.6.2 (OK)
pygments >=1.6     :  2.0.2 (OK)
IPython >=1.0      :  4.0.0 (OK)
zmq >=2.1.11       :  14.7.0 (OK)
qtconsole >=4.0    :  4.1.0 (OK)
pandas >=0.13.1    :  0.17.0 (OK)
sphinx >=0.6.6     :  1.3.1 (OK)
psutil >=0.3       :  3.2.2 (OK)
rope >=0.9.2       :  0.9.4-1 (OK)
jedi >=0.8.1;<0.9.0:  0.9.0 (NOK)
matplotlib >=1.0   :  1.4.3 (OK)
sympy >=0.7.3      :  <IP_ADDRESS> (OK)
pylint >=0.25      :  None (NOK)

Please try to run
conda update setuptools

to see if that fixes your problem.

Thank Carlos. Indeed, now it works fine, that's great, however fyi, what I got is this, not sure if something got flushed under the hood or nothing happened really with this command:
$ conda update setuptools
Fetching package metadata: ....
# All requested packages already installed.
# packages in environment at /Users/asierberra/anaconda:
#
setuptools                18.4                     py35_0

Well, thanks for reporting back that everything is working fine for you now ;-)

I also meet the similar problem when using the spyder.
An error ocurred while starting the kernel
IPython: an enhanced interactive Python shell.
Subcommands
‑‑‑‑‑‑‑‑‑‑‑
Subcommands are launched as ipython‑kernel cmd [args]. For information on
using subcommand 'cmd', do: ipython‑kernel cmd ‑h.
install
Install the IPython kernel
Options
‑‑‑‑‑‑‑
Arguments that take values are actually convenience aliases to full
Configurables, whose aliases are listed on the help line. For more information
on full configurables, see '‑‑help‑all'.
‑‑no‑autoindent
Turn off autoindenting.
‑‑deep‑reload
Deprecated and will be removed in IPython 5.0.
Enable deep (recursive) reloading by default. IPython can use the
deep_reload module which reloads changes in modules recursively (it
replaces the reload() function, so you don't need to change anything to
use it). deep_reload() forces a full reload of modules whose code may
have changed, which the default reload() function does not. When
deep_reload is off, IPython will use the normal reload(), but
deep_reload will still be available as dreload(). This feature is off
by default [which means that you have both normal reload() and
dreload()].
‑‑secure
Use HMAC digests for authentication of messages.
Setting this flag will generate a new UUID to use as the HMAC key.
‑‑pylab
Pre‑load matplotlib and numpy for interactive use with
the default matplotlib backend.
‑‑matplotlib
Configure matplotlib for interactive use with
the default matplotlib backend.
‑‑autoindent
Turn on autoindenting.
‑‑automagic
Turn on the auto calling of magic commands. Type %%magic at the
IPython prompt for more information.
‑‑no‑secure
Don't authenticate messages.
‑‑no‑deep‑reload
Disable deep (recursive) reloading by default.
‑‑no‑stdout
redirect stdout to the null device
‑‑no‑automagic
Turn off the auto calling of magic commands.
‑‑nosep
Eliminate all spacing between prompts.
‑‑pprint
Enable auto pretty printing of results.
‑‑quiet
set log level to logging.CRITICAL (minimize logging output)
‑‑no‑color‑info
Disable using colors for info related things.
‑‑color‑info
IPython can display information about objects via a set of functions,
and optionally can use colors for this, syntax highlighting
source code and various other elements. This is on by default, but can cause
problems with some pagers. If you see such problems, you can disable the
colours.
‑‑init
Initialize profile with default config files. This is equivalent
to running ipython profile create  prior to startup.
‑‑no‑pdb
Disable auto calling the pdb debugger after every exception.
‑‑debug
set log level to logging.DEBUG (maximize logging output)
‑‑pydb
Use the third party 'pydb' package as debugger, instead of pdb.
Requires that pydb is installed.
‑‑pdb
Enable auto calling the pdb debugger after every exception.
‑‑no‑pprint
Disable auto pretty printing of results.
‑‑no‑stderr
redirect stderr to the null device
‑‑profile= (BaseIPythonApplication.profile)
Default: u'default'
The IPython profile to use.
‑‑control= (IPKernelApp.control_port)
Default: 0
set the control (ROUTER) port [default: random]
‑‑shell= (IPKernelApp.shell_port)
Default: 0
set the shell (ROUTER) port [default: random]
‑‑ip= (IPKernelApp.ip)
Default: u''
Set the kernel's IP address [default localhost]. If the IP address is
something other than localhost, then Consoles on other machines will be able
to connect to the Kernel, so be careful!
‑‑pylab= (InteractiveShellApp.pylab)
Default: None
Choices: [u'auto', u'gtk', u'gtk3', u'inline', u'nbagg', u'notebook', u'osx', u'qt', u'qt4', u'qt5', u'tk', u'wx']
Pre‑load matplotlib and numpy for interactive use, selecting a particular
matplotlib backend and loop integration.
‑‑matplotlib= (InteractiveShellApp.matplotlib)
Default: None
Choices: [u'auto', u'gtk', u'gtk3', u'inline', u'nbagg', u'notebook', u'osx', u'qt', u'qt4', u'qt5', u'tk', u'wx']
Configure matplotlib for interactive use with the default matplotlib
backend.
‑‑colors= (InteractiveShell.colors)
Default: 'Linux'
Choices: [u'NoColor', u'LightBG', u'Linux']
Set the color scheme (NoColor, Linux, or LightBG).
‑‑iopub= (IPKernelApp.iopub_port)
Default: 0
set the iopub (PUB) port [default: random]
‑‑cache‑size= (InteractiveShell.cache_size)
Default: 1000
Set the size of the output cache. The default is 1000, you can change it
permanently in your config file. Setting it to 0 completely disables the
caching system, and the minimum value accepted is 20 (if you provide a value
less than 20, it is reset to 0 and a warning is issued). This limit is
defined because otherwise you'll spend more time re‑flushing a too small
cache than working
‑‑hb= (IPKernelApp.hb_port)
Default: 0
set the heartbeat port [default: random]
‑‑logfile= (InteractiveShell.logfile)
Default: ''
The name of the logfile to use.
‑‑transport= (IPKernelApp.transport)
Default: 'tcp'
Choices: [u'tcp', u'ipc']
‑‑stdin= (IPKernelApp.stdin_port)
Default: 0
set the stdin (ROUTER) port [default: random]
‑c (InteractiveShellApp.code_to_run)
Default: ''
Execute the given command string.
‑‑ident= (Session.session)
Default: u''
The UUID identifying this session.
‑‑autocall= (InteractiveShell.autocall)
Default: 0
Choices: (0, 1, 2)
Make IPython automatically call any callable object even if you didn't type
explicit parentheses. For example, 'str 43' becomes 'str(43)' automatically.
The value can be '0' to disable the feature, '1' for 'smart' autocall, where
it is not applied if there are no more arguments on the line, and '2' for
'full' autocall, where all callable objects are automatically called (even
if no arguments are present).
‑‑ipython‑dir= (BaseIPythonApplication.ipython_dir)
Default: u''
The name of the IPython directory. This directory is used for logging
configuration (through profiles), history storage, etc. The default is
usually $HOME/.ipython. This option can also be specified through the
environment variable IPYTHONDIR.
‑f (IPKernelApp.connection_file)
Default: ''
JSON file in which to store connection info [default: kernel‑.json]
This file will contain the IP, ports, and authentication key needed to
connect clients to this kernel. By default, this file will be created in the
security dir of the current profile, but can be specified by absolute path.
‑‑config= (BaseIPythonApplication.extra_config_file)
Default: u''
Path to an extra config file to load.
If specified, load this config file in addition to any other IPython config.
‑‑gui= (InteractiveShellApp.gui)
Default: None
Choices: [u'glut', u'gtk', u'gtk3', u'osx', u'pyglet', u'qt', u'qt5', u'tk', u'wx']
Enable GUI event loop integration with any of ('glut', 'gtk', 'gtk3', 'osx',
'pyglet', 'qt', 'qt5', 'tk', 'wx').
‑‑logappend= (InteractiveShell.logappend)
Default: ''
Start logging to the given file in append mode. Use logfile to specify a
log file to overwrite logs to.
‑m (InteractiveShellApp.module_to_run)
Default: ''
Run the module as a script.
‑‑log‑level= (Application.log_level)
Default: 30
Choices: (0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL')
Set the log level by value or name.
‑‑ext= (InteractiveShellApp.extra_extension)
Default: ''
dotted module name of an IPython extension to load.
‑‑profile‑dir= (ProfileDir.location)
Default: u''
Set the profile location directly. This overrides the logic used by the
profile option.
‑‑keyfile= (Session.keyfile)
Default: ''
path to file containing execution key.
‑‑user= (Session.username)
Default: u'username'
Username for the Session. Default is your system username.
To see all available configurables, use ‑‑help‑all
[IPKernelApp] CRITICAL | Bad config encountered during initialization:
[IPKernelApp] CRITICAL | Could not decode 'C:\Users\\xc9\xf2\xd1\xd0\xbe\xbf\xca\xd2\AppData\Roaming\jupyter\runtime' for unicode trait 'connection_dir' of an IPKernelApp instance.
Could you help me to solve it? Thanks a lot for your attention.

ccordoba12 THANKS!!!!!!  this solve my problem!

Thanks @ccordoba12 !!! Really helpful.

Hi guys, the trick for me was: tools -> Reset Spyder to Factory Defaults

Resetting solved this for me too. Couldn't connect to kernel before the reset.

I have tried th update settools,but i did not work, anyone can help me ,thanks a lot
2018󈚨󈚵 18:02:04.044943: I T:\src\github\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2018󈚨󈚵 18:02:05.288395: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1344] Found device 0 with properties:
name: GeForce MX150 major: 6 minor: 1 memoryClockRate(GHz): 1.5315
pciBusID: 0000:01:00.0
totalMemory: 2.00GiB freeMemory: 1.62GiB
2018󈚨󈚵 18:02:05.292660: I
T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1423] Adding visible gpu devices: 0
2018󈚨󈚵 18:02:06.315233: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:911] Device interconnect StreamExecutor with strength 1 edge matrix:
2018󈚨󈚵 18:02:06.316012: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:917] 0
2018󈚨󈚵 18:02:06.316404: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:930] 0: N
2018󈚨󈚵 18:02:06.316957: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1041] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1387 MB memory) ‑> physical GPU (device: 0, name: GeForce MX150, pci bus id: 0000:01:00.0, compute capability: 6.1)
2018󈚨󈚵 18:02:08.654805: E T:\src\github\tensorflow\tensorflow\stream_executor\cuda\cuda_dnn.cc:396] Loaded runtime CuDNN library: 7102 (compatibility version 7100) but source was compiled with 7003 (compatibility version 7000). If using a binary install, upgrade your CuDNN library to match. If building from sources, make sure the library loaded at runtime matches a compatible version specified during compile configuration.
2018󈚨󈚵 18:02:08.658414: F T:\src\github\tensorflow\tensorflow\core\kernels\conv_ops.cc:712] Check failed: stream‑>parent()‑>GetConvolveAlgorithms( conv_parameters.ShouldIncludeWinogradNonfusedAlgo(), &algorithms)

Can someone help me with the similar error?
An error ocurred while starting the kernel
2018󈚫󈚸 09:27:16.430887: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX
The error happens when I tried to obtain reproducible results using tensorflow and keras using Spyder. And it usually runs fine with the first and second running, but shows up in the third running.
Specifically, the error occurs after adding code:
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
import random as rn
import numpy as np
np.random.seed(1)
rn.seed(2)
tf.set_random_seed(3)
from keras import backend as K
session_conf = tf.ConfigProto(intra_op_parallelism_threads=1,
inter_op_parallelism_threads=1)
#Force Tensorflow to use a single thread
sess = tf.Session(graph=tf.get_default_graph(), config=session_conf)
K.set_session(sess)
I would appreciate a lot if someone could help me out!

I have same problem too! and i con not fix it :(
An error ocurred while starting the kernel
Traceback (most recent call last):
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 87, in catch_corrupt_db
return f(self, *a, **kw)
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 257, in init_db
end timestamp, num_cmds integer, remark text)""")
sqlite3.DatabaseError: database disk image is malformed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "D:\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "D:\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "D:\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 284, in main
kernel.initialize()
File "", line 2, in initialize
File "D:\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "D:\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 478, in initialize
self.init_kernel()
File "D:\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "D:\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "D:\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "D:\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 58, in init
kernel = self,
File "D:\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "D:\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 501, in init
self.init_history()
File "D:\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 1621, in init_history
self.history_manager = HistoryManager(shell=self, parent=self)
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 537, in init
**traits)
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 229, in init
self.init_db()
File "", line 2, in init_db
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 113, in catch_corrupt_db
os.rename(self.hist_file, newpath)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\Users\HAMED\.ipython\profile_default\history.sqlite' ‑> 'C:\Users\HAMED\.ipython\profile_default\history‑corrupt�󈚮󈚴T<IP_ADDRESS>356.sqlite'
Traceback (most recent call last):
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 87, in catch_corrupt_db
return f(self, *a, **kw)
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 257, in init_db
end timestamp, num_cmds integer, remark text)""")
sqlite3.DatabaseError: database disk image is malformed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "D:\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "D:\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "D:\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 284, in main
kernel.initialize()
File "", line 2, in initialize
File "D:\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "D:\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 478, in initialize
self.init_kernel()
File "D:\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "D:\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "D:\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "D:\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 58, in init
kernel = self,
File "D:\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "D:\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 501, in init
self.init_history()
File "D:\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 1621, in init_history
self.history_manager = HistoryManager(shell=self, parent=self)
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 537, in init
**traits)
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 229, in init
self.init_db()
File "", line 2, in init_db
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 113, in catch_corrupt_db
os.rename(self.hist_file, newpath)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\Users\HAMED\.ipython\profile_default\history.sqlite' ‑> 'C:\Users\HAMED\.ipython\profile_default\history‑corrupt�󈚮󈚴T<IP_ADDRESS>5852.sqlite'
Traceback (most recent call last):
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 87, in catch_corrupt_db
return f(self, *a, **kw)
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 257, in init_db
end timestamp, num_cmds integer, remark text)""")
sqlite3.DatabaseError: database disk image is malformed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "D:\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "D:\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "D:\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 284, in main
kernel.initialize()
File "", line 2, in initialize
File "D:\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "D:\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 478, in initialize
self.init_kernel()
File "D:\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "D:\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "D:\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "D:\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 58, in init
kernel = self,
File "D:\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "D:\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 501, in init
self.init_history()
File "D:\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 1621, in init_history
self.history_manager = HistoryManager(shell=self, parent=self)
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 537, in init
**traits)
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 229, in init
self.init_db()
File "", line 2, in init_db
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 113, in catch_corrupt_db
os.rename(self.hist_file, newpath)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\Users\HAMED\.ipython\profile_default\history.sqlite' ‑> 'C:\Users\HAMED\.ipython\profile_default\history‑corrupt�󈚮󈚴T<IP_ADDRESS>2109.sqlite'
Traceback (most recent call last):
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 87, in catch_corrupt_db
return f(self, *a, **kw)
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 257, in init_db
end timestamp, num_cmds integer, remark text)""")
sqlite3.DatabaseError: database disk image is malformed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "D:\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "D:\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "D:\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 284, in main
kernel.initialize()
File "", line 2, in initialize
File "D:\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "D:\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 478, in initialize
self.init_kernel()
File "D:\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "D:\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "D:\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "D:\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 58, in init
kernel = self,
File "D:\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "D:\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 501, in init
self.init_history()
File "D:\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 1621, in init_history
self.history_manager = HistoryManager(shell=self, parent=self)
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 537, in init
**traits)
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 229, in init
self.init_db()
File "", line 2, in init_db
File "D:\Anaconda3\lib\site‑packages\IPython\core\history.py", line 113, in catch_corrupt_db
os.rename(self.hist_file, newpath)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\Users\HAMED\.ipython\profile_default\history.sqlite' ‑> 'C:\Users\HAMED\.ipython\profile_default\history‑corrupt�󈚮󈚴T<IP_ADDRESS>6609.sqlite'

Look for and remove a directory called .ipython in your Users directory.

Hi all,
I have the same problem. The Kernel doesn't work after running my model for 1 time. I mean, for the first time it works well but for the second time it gives me the following Error. I tried to update and to reset Spyder but the problem exists still. I have to close Spyder and reopen it in order to let me run the model for another time.
An error ocurred while starting the kernel
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "C:\ProgramData\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 272, in main
import_spydercustomize()
File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 32, in import_spydercustomize
import spydercustomize
File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\customize\spydercustomize.py", line 25, in
from IPython.core.getipython import get_ipython
File "C:\ProgramData\Anaconda3\lib\site‑packages\IPython_init.py", line 54, in
from .core.application import Application
File "C:\ProgramData\Anaconda3\lib\site‑packages\IPython\core\application.py", line 23, in
from traitlets.config.application import Application, catch_config_error
File "C:\ProgramData\Anaconda3\lib\site‑packages\traitlets\config_init_.py", line 6, in
from .application import *
File "C:\ProgramData\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 19, in
from traitlets.config.configurable import Configurable, SingletonConfigurable
File "C:\ProgramData\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 12, in
from .loader import Config, LazyConfigValue, _is_section_key
File "C:\ProgramData\Anaconda3\lib\site‑packages\traitlets\config\loader.py", line 16, in
from ipython_genutils.path import filefind
File "C:\ProgramData\Anaconda3\lib\site‑packages\ipython_genutils\path.py", line 13, in
import random
File "C:\Users\mohemmat\Desktop\Mina\random.py", line 136
except ValueError, e:
^
SyntaxError: invalid syntax

@MonaHemmati, Please update to Spyder 3.3.2 and spyder-kernels 0.3.0 to fix that problem.

Thanks, It worked well.

Hi
I have been having this issue. Please suggest me possible solution. Here is the error i get while starting spyder in anaconda.
An error ocurred while starting the kernel
Traceback (most recent call last):
File "C:\Users\Biggest\Anaconda3\lib\runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "C:\Users\Biggest\Anaconda3\lib\runpy.py", line 72, in run_code
exec code in run_globals
File "C:\Users\Biggest\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 2, in
from spyder_kernels.console import start
File "C:\Users\Biggest\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 12, in
from distutils.version import LooseVersion
File "C:\Users\Biggest\Anaconda3\lib\distutils\version.py", line 29, in
import string, re
File "string.py", line 14, in
s = input()
EOFError: EOF when reading a line

Please see my last comment.

The rename or remove this file
C:\Users\Biggest\string.py

hi
I deleted the file but the error is still there.
An error ocurred while starting the kernel
Traceback (most recent call last):
File "C:\Users\Biggest\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\Biggest\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\Biggest\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\Biggest\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 279, in main
import_spydercustomize()
File "C:\Users\Biggest\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 39, in import_spydercustomize
import spydercustomize
File "C:\Users\Biggest\Anaconda3\lib\site‑packages\spyder_kernels\customize\spydercustomize.py", line 19, in
import pdb
File "C:\Users\Biggest\Anaconda3\lib\pdb.py", line 73, in
import cmd
File "C:\Users\Biggest\Anaconda3\lib\cmd.py", line 45, in
import string, sys
ImportError: bad magic number in 'string': b'\x03\xf3\r\n'
please help.

hi
At last, I found a solution that worked. I deleted the files with 'pyc' extension. And it worked.
Thanks a lot for all the help.

Dear All
I came across this issue when I started spyder and when I restarted the kernel, it kept report kernel died. Since I'm a starter, I have no idea what's going on.
Thank you very much for the help.
Traceback (most recent call last): File "C:\Users\Administrator\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "C:\Users\Administrator\Anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\Administrator\Anaconda3\lib\site‑packages\spyder_kernels\console\__main__.py", line 11, in  start.main() File "C:\Users\Administrator\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main kernel.initialize() File "", line 2, in initialize File "C:\Users\Administrator\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error return method(app, *args, **kwargs) File "C:\Users\Administrator\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize self.init_kernel() File "C:\Users\Administrator\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel user_ns=self.user_ns, File "C:\Users\Administrator\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance inst = cls(*args, **kwargs) File "C:\Users\Administrator\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in __init__ super(SpyderKernel, self).__init__(*args, **kwargs) File "C:\Users\Administrator\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in __init__ kernel = self, File "C:\Users\Administrator\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance inst = cls(*args, **kwargs) File "C:\Users\Administrator\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in __init__ self.init_magics() File "C:\Users\Administrator\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics super(ZMQInteractiveShell, self).init_magics() File "C:\Users\Administrator\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics, File "C:\Users\Administrator\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register m = m(shell=self.shell) File "C:\Users\Administrator\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in __init__ self.execre = re.compile(r'(.*)\.(%s)$' % winext,re.IGNORECASE) File "C:\Users\Administrator\Anaconda3\lib\re.py", line 234, in compile return _compile(pattern, flags) File "C:\Users\Administrator\Anaconda3\lib\re.py", line 286, in _compile p = sre_compile.compile(pattern, flags) File "C:\Users\Administrator\Anaconda3\lib\sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "C:\Users\Administrator\Anaconda3\lib\sre_parse.py", line 930, in parse p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0) File "C:\Users\Administrator\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub not nested and not items)) File "C:\Users\Administrator\Anaconda3\lib\sre_parse.py", line 816, in _parse p = _parse_sub(source, state, sub_verbose, nested + 1) File "C:\Users\Administrator\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub not nested and not items)) File "C:\Users\Administrator\Anaconda3\lib\sre_parse.py", line 507, in _parse code = _escape(source, this, state) File "C:\Users\Administrator\Anaconda3\lib\sre_parse.py", line 402, in _escape raise source.error("bad escape %s" % escape, len(escape)) re.error: bad escape \P at position 52

@derech, it seems you're Anaconda installation is corrupted. Please reinstall.

hi!
I am new to this environment. I reinstalled anaconda many times and when it started, spyder stopped working and gave an error that "an error occurred while starting the kernel" and i tried mostly all of your commands but that didn't worked for me. Please @ccordoba12 can you help me?
Here's a screenshot
screenshot.zip

hi！
my problem is
An error ocurred while starting the kernel
b''
spyder stopped working and gave an error that "an error occurred while starting the kernel" and i tried mostly all of your commands but that didn't worked for me.
Please @ccordoba12 can you help me?

I have the same problem as @anglem
An error ocurred while starting the kernel
b''
Can any people help us? Many thanks!

hi
Is there any files with 'pyc' extension in the working directory?  You might need to delete them and try again.

@anglem @quantumdotsss @Rsjohn7 The issue you're describing is completely different from the one originally being discussed here, given it does not produce anything even remotely resembling the error traceback included in the original post. Therefore, if one of you could open a new issue following our new issue template and reference this one (by typing #2812 somewhere in your post body) so the others can see you've already done so and add any additional information they can provide, that would be great. Thanks!

Hello all. I have just install anaconda and created a new environment with python2.7 and launched Spyder. I got 'the error while starting the kernel':
Traceback (most recent call last):
File "C:\Anaconda3\envs\ForAlps\lib\site‑packages\spyder\plugins\ipythonconsole.py", line 1544, in create_kernel_manager_and_kernel_client
config=None, autorestart=True)
File "C:\Anaconda3\envs\ForAlps\lib\site‑packages\traitlets\config\configurable.py", line 73, in init
super(Configurable, self).init(**kwargs)
File "C:\Anaconda3\envs\ForAlps\lib\site‑packages\traitlets\traitlets.py", line 997, in init
setattr(self, key, value)
File "C:\Anaconda3\envs\ForAlps\lib\site‑packages\traitlets\traitlets.py", line 585, in set
self.set(obj, value)
File "C:\Anaconda3\envs\ForAlps\lib\site‑packages\traitlets\traitlets.py", line 559, in set
new_value = self._validate(obj, value)
File "C:\Anaconda3\envs\ForAlps\lib\site‑packages\traitlets\traitlets.py", line 591, in _validate
value = self.validate(obj, value)
File "C:\Anaconda3\envs\ForAlps\lib\site‑packages\traitlets\traitlets.py", line 2053, in validate
raise TraitError(msg.format(value, self.name, class_of(obj)))
TraitError: Could not decode 'C:\Users\\xc8\xe2\xe0\xed\AppData\Roaming\jupyter\runtime\kernel‑a159c53dafb9.json' for unicode trait 'connection_file' of a QtKernelManager instance.
environments with py37 and py36 work well. but this environment is not working.
I tried 'conda update setuptools' and also 'tools -> Reset Spyder to Factory Defaults' in Spyder. but it doenst help.

C:\Users\xc8\xe2\xe0\xed

You need to change your Windows user name to not contain special characters.

changed. the same problem. Why environment with py36 works well apart from the one with py27?

That was the problem as far as the error above shows. If you're getting the same error, then you haven't changed your name correctly.

I changed to 'IVAN'. it is displayed when i rebooted the system. :(

Ok, probably Windows doesn't change your C:\Users<your user> folder after you change your user name. And that folder's name is what you really need to change.

yes, the folder's name does not changed. However, anaconda is installed in 'C:\Anaconda3' not in 'C:\Users'.
How can I rename the folder? I do not see 'rename' button when click at the folder.

yes, the folder's name does not changed. However, anaconda is installed in 'C:\Anaconda3' not in 'C:\Users'.

Because Spyder needs to create some files in your Users' directory.

How can I rename the folder? I do not see 'rename' button when click at the folder.

I don't know, sorry.

Why environment with py36 works well apart from the one with py27?

Because Python 3.6 is a modern version of Python that has proper Unicode support for special characters, while Python 2.7 is ancient, ten years old and going to be end of life in less than a year, and thus should be avoided if at all possible.

How can I rename the folder? I do not see 'rename' button when click at the folder.

Did you try Googling it?

Thank you guyz! Indeed, the problem occured because of my folder's name. I changed it. Now it works well!

hi everyone even i am facing same  problem to starting the kernel and error were occur like below given can anybody help me.
Traceback (most recent call last):
File "/Users/mrunmayeerane/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/Users/mrunmayeerane/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/mrunmayeerane/anaconda3/lib/python3.7/site‑packages/spyder_kernels/console/main.py", line 11, in
start.main()
File "/Users/mrunmayeerane/anaconda3/lib/python3.7/site‑packages/spyder_kernels/console/start.py", line 279, in main
import_spydercustomize()
File "/Users/mrunmayeerane/anaconda3/lib/python3.7/site‑packages/spyder_kernels/console/start.py", line 39, in import_spydercustomize
import spydercustomize
File "/Users/mrunmayeerane/anaconda3/lib/python3.7/site‑packages/spyder_kernels/customize/spydercustomize.py", line 25, in
from IPython.core.getipython import get_ipython
File "/Users/mrunmayeerane/anaconda3/lib/python3.7/site‑packages/IPython/init.py", line 55, in
from .terminal.embed import embed
File "/Users/mrunmayeerane/anaconda3/lib/python3.7/site‑packages/IPython/terminal/embed.py", line 14, in
from IPython.core.magic import Magics, magics_class, line_magic
File "/Users/mrunmayeerane/anaconda3/lib/python3.7/site‑packages/IPython/core/magic.py", line 20, in
from IPython.core import oinspect
File "/Users/mrunmayeerane/anaconda3/lib/python3.7/site‑packages/IPython/core/oinspect.py", line 29, in
from IPython.lib.pretty import pretty
File "/Users/mrunmayeerane/anaconda3/lib/python3.7/site‑packages/IPython/lib/pretty.py", line 82, in
import datetime
File "/Users/mrunmayeerane/datetime.py", line 11, in
x=datetime.datetime.now()
AttributeError: module 'datetime' has no attribute 'now'

hi everyone even i am facing same problem while starting the kernel

@mrunmayee17  Just like every other "same problem" posted on this thread, this is not the same problem, as every single line of your error traceback is totally different from the one posted in the original post. In fact, like four other posters on this tread, this comes down to the same basic Python user mistake, completely unrelated to Spyder, that should be pretty clear if you read your traceback (which is no different from any other Python traceback you might see from your own code).
As you can see, your File "/Users/mrunmayeerane/datetime.py" is overriding the standard library datetime when the kernel tries to load it, and so it breaks. To fix this, you should never name your files the same as Python standard library modules. Thanks.

Thanks a ton !! It worked for me

I have uninstalled and installed anconda many times, but the problem still arises. Please help me. Thank you very much.
An error ocurred while starting the kernel
The error is:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\sitepackages\traitlets\traitlets.py", line 526, in get
value = obj._trait_values[self.name]
KeyError: 'context'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\sitepackages\spyder\plugins\ipythonconsole.py", line 1554, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle)
File "C:\ProgramData\Anaconda3\lib\sitepackages\jupyter_client\manager.py", line 261, in start_kernel
self._connect_control_socket()
File "C:\ProgramData\Anaconda3\lib\sitepackages\jupyter_client\manager.py", line 210, in _connect_control_socket
self._control_socket = self.connect_control()
File "C:\ProgramData\Anaconda3\lib\sitepackages\jupyter_client\connect.py", line 571, in connect_control
return self._create_connected_socket('control', identity=identity)
File "C:\ProgramData\Anaconda3\lib\sitepackages\jupyter_client\connect.py", line 543, in _create_connected_socket
sock = self.context.socket(socket_type)
File "C:\ProgramData\Anaconda3\lib\sitepackages\traitlets\traitlets.py", line 554, in get
return self.get(obj, cls)
File "C:\ProgramData\Anaconda3\lib\sitepackages\traitlets\traitlets.py", line 533, in get
value = self._validate(obj, dynamic_default())
File "C:\ProgramData\Anaconda3\lib\sitepackages\jupyter_client\manager.py", line 42, in _context_default
return zmq.Context.instance()
File "C:\ProgramData\Anaconda3\lib\sitepackages\zmq\sugar\context.py", line 108, in instance
cls._instance = cls(io_threads=io_threads)
File "zmq/backend/cython/context.pyx", line 49, in zmq.backend.cython.context.Context.cinit
zmq.error.ZMQError: Unknown error

@qylsyf1992, your error is not related to Spyder but (as far as we know) to your firewall and/or antivirus. Please deactivate them and try again.

@ qylsyf1992，您的错误与Spyder无关，但（据我们所知）您的防火墙和/或防病毒。请停用它们，然后重试。

Thank you very much for your timely reply！I uninstalled 360. After restarting the computer and shutting down the firewall, I really succeeded.
God bless you！

An error ocurred while starting the kernel
Traceback (most recent call last):
File "C:\Users\Malli\Anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "C:\Users\Malli\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\Malli\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\Malli\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 279, in main
import_spydercustomize()
File "C:\Users\Malli\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 39, in import_spydercustomize
import spydercustomize
File "C:\Users\Malli\Anaconda3\lib\site‑packages\spyder_kernels\customize\spydercustomize.py", line 19, in
import pdb
File "C:\Users\Malli\Anaconda3\lib\pdb.py", line 73, in
import cmd
File "C:\Users\Malli\Anaconda3\lib\cmd.py", line 50, in
IDENTCHARS = string.ascii_letters + string.digits + ''
AttributeError: module 'string' has no attribute 'ascii_letters'

@manojkumarka Repeating myself yet again...

Just like every other "same problem" posted on this thread, this is not the same problem, as every single line of your error traceback is totally different from the one posted in the original post. In fact, like ~two~ ~three~ ~four~ five other posters on this tread, this comes down to the same basic Python user mistake, completely unrelated to Spyder.

I assume you have a file named string.py someone in your working directory. Please rename or move it, as it is overriding the string module in the Python standard library. You should never name (at least top-level modules) the same as Python standard library modules, and keeping your own modules in their own package directory off your working directory is a good way to keep this from occurring at all.

Une erreur est survenue lors du démarrage du noyau
Une erreur est survenue lors du démarrage du noyau
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52

help plzzz
Une erreur est survenue lors du démarrage du noyau
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52
Traceback (most recent call last):
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\emna\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 298, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\emna\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 679, in init
self.init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2223, in init_magics
m.NamespaceMagics, m.OSMagics, m.PylabMagics, m.ScriptMagics,
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 386, in register
m = m(shell=self.shell)
File "C:\Users\emna\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\emna\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\emna\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\emna\Anaconda3\lib\sre_parse.py", line 369, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 52

@emna1503 Please don't post repeated comments, especially after I already had to edit your first one to hide the massive, unformatted, repeated traceback you pasted in there.
Yet again, for perhaps the 10th time...

Just like every other "same problem" posted on this closed issue, this is not the same problem, as every single line of your error traceback is totally different from the one posted in the original post.

I'm not 100% sure what's causing your issue, but please provide me a list of all the .py files and any directories present in your current working directory, as this may be the same problem as a half dozen other posters (naming a file the same as a Python standard library one). Other than that, please provide your Spyder, Spyder-Kernels, Python, operating system, QtConsole, IPython and ipykernel versions (you can find most of these in the About and Dependencies dialogs in Spyder's Help menu, along with how you installed Spyder (Anaconda, etc).

Hi
my console freezes always and does not let me to run the program,
"an error occurred while starting the kernel"
"An error ocurred while starting the kernel
The error is:
Traceback (most recent call last):
File "C:\Users\Redbull\AppData\Local\conda\conda\envs\se4g\lib\site‑packages\traitlets\traitlets.py", line 528, in get
value = obj._trait_values[self.name]
KeyError: 'context'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Redbull\AppData\Local\conda\conda\envs\se4g\lib\site‑packages\spyder\plugins\ipythonconsole.py", line 1554, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle)
File "C:\Users\Redbull\AppData\Local\conda\conda\envs\se4g\lib\site‑packages\jupyter_client\manager.py", line 261, in start_kernel
self._connect_control_socket()
File "C:\Users\Redbull\AppData\Local\conda\conda\envs\se4g\lib\site‑packages\jupyter_client\manager.py", line 210, in _connect_control_socket
self._control_socket = self.connect_control()
File "C:\Users\Redbull\AppData\Local\conda\conda\envs\se4g\lib\site‑packages\jupyter_client\connect.py", line 571, in connect_control
return self._create_connected_socket('control', identity=identity)
File "C:\Users\Redbull\AppData\Local\conda\conda\envs\se4g\lib\site‑packages\jupyter_client\connect.py", line 543, in _create_connected_socket
sock = self.context.socket(socket_type)
File "C:\Users\Redbull\AppData\Local\conda\conda\envs\se4g\lib\site‑packages\traitlets\traitlets.py", line 556, in get
return self.get(obj, cls)
File "C:\Users\Redbull\AppData\Local\conda\conda\envs\se4g\lib\site‑packages\traitlets\traitlets.py", line 535, in get
value = self._validate(obj, dynamic_default())
File "C:\Users\Redbull\AppData\Local\conda\conda\envs\se4g\lib\site‑packages\jupyter_client\manager.py", line 42, in _context_default
return zmq.Context.instance()
File "C:\Users\Redbull\AppData\Local\conda\conda\envs\se4g\lib\site‑packages\zmq\sugar\context.py", line 108, in instance
cls._instance = cls(io_threads=io_threads)
File "zmq/backend/cython/context.pyx", line 49, in zmq.backend.cython.context.Context.cinit
zmq.error.ZMQError: Unknown error"
what should I do?
Tnx

getting this error message,need help resolving it pls
An error ocurred while starting the kernel
Traceback (most recent call last):
File "/home/anuli/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/anuli/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/anuli/anaconda3/lib/python3.7/site‑packages/spyder_kernels/console/main.py", line 11, in
start.main()
File "/home/anuli/anaconda3/lib/python3.7/site‑packages/spyder_kernels/console/start.py", line 279, in main
import_spydercustomize()
File "/home/anuli/anaconda3/lib/python3.7/site‑packages/spyder_kernels/console/start.py", line 39, in import_spydercustomize
import spydercustomize
File "/home/anuli/anaconda3/lib/python3.7/site‑packages/spyder_kernels/customize/spydercustomize.py", line 25, in
from IPython.core.getipython import get_ipython
File "/home/anuli/anaconda3/lib/python3.7/site‑packages/IPython/init.py", line 54, in
from .core.application import Application
File "/home/anuli/anaconda3/lib/python3.7/site‑packages/IPython/core/application.py", line 23, in
from traitlets.config.application import Application, catch_config_error
File "/home/anuli/anaconda3/lib/python3.7/site‑packages/traitlets/config/init.py", line 6, in
from .application import *
File "/home/anuli/anaconda3/lib/python3.7/site‑packages/traitlets/config/application.py", line 19, in
from traitlets.config.configurable import Configurable, SingletonConfigurable
File "/home/anuli/anaconda3/lib/python3.7/site‑packages/traitlets/config/configurable.py", line 12, in
from .loader import Config, LazyConfigValue, _is_section_key
File "/home/anuli/anaconda3/lib/python3.7/site‑packages/traitlets/config/loader.py", line 16, in
from ipython_genutils.path import filefind
File "/home/anuli/anaconda3/lib/python3.7/site‑packages/ipython_genutils/path.py", line 13, in
import random
File "/home/anuli/anaconda3/lib/python3.7/random.py", line 46, in
from hashlib import sha512 as _sha512
ImportError: cannot import name 'sha512' from 'hashlib' (/home/anuli/hashlib.py)

Just like every other "same problem" posted on this closed issue, this is not the same problem, as every single line of both of your error tracebacks is totally different from the one posted in the original post.

@ANULIautomation

In fact, like ~two~ ~three~ ~four~ ~five~ six other posters on this tread, this comes down to the same basic Python user mistake, completely unrelated to Spyder.

As you can see from your traceback, your file /home/anuli/hashlib.py is overriding the builtin hashlib module. You should never name your files the same as Python standard library modules (view the Python docs for a list), or things will break. Rename this file or move it out of the working directory to fix the problem.
@akbar1111111 This error is a duplicate of, e.g. #8561 and is due to a problem with a third party library on your machine. You need to temporarily disable your firewall and any other security software (if it fixes it, make an exception/allow rule for Spyder), and update PyZMQ with conda update spyder spyder-kernels pyzmq zeromq jupyter_client ipykernel at the Anaconda prompt.

@spyder-ide
Hi, an error occurred while updating the program in Anaconda prompt
"

@akbar1111111 That error, as you can see, is an error with conda, which has nothing to do with Spyder. Furthermore, it is due to (auto-)updating conda itself, not any of the packages I mentioned. Furthermore, it is an expected result of how you chose to configure your conda install (installing for "all users", i.e. as Administer).
Furthermore, it presents evidence of another user error, mixing the defaults and conda-forge  channels (which should not be done) in your base environment (as conda is attempting to update itself from a defaults to conda-forge version, which is bad) and could be causing your problem as well. If you've disabled any firewalls or other security software, restarted Spyder and are still seeing the error, please post your conda list output inside a <details> block exactly like I show below (or that I edited your post to include) and I can evaluate it.
<details>

```
REPLACE THIS LINE WITH YOUR CONDA LIST OUTPUT <---
```

</details>

When  opening a new ipython console session within Spyder, it crashes. Below is the error message. However, the very first ipython console session that get's opened by Spyder, does work. I have reinstalled anaconda with a fresh new download but the problem keeps appearing.
Traceback (most recent call last):
File "C:\Users\Lenovo\Anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "C:\Users\Lenovo\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\Lenovo\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\Lenovo\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 279, in main
import_spydercustomize()
File "C:\Users\Lenovo\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 39, in import_spydercustomize
import spydercustomize
File "C:\Users\Lenovo\Anaconda3\lib\site‑packages\spyder_kernels\customize\spydercustomize.py", line 27, in
from IPython.core.getipython import get_ipython
File "C:\Users\Lenovo\Anaconda3\lib\site‑packages\IPython_init.py", line 55, in
from .terminal.embed import embed
File "C:\Users\Lenovo\Anaconda3\lib\site‑packages\IPython\terminal\embed.py", line 14, in
from IPython.core.magic import Magics, magics_class, line_magic
File "C:\Users\Lenovo\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 20, in
from IPython.core import oinspect
File "C:\Users\Lenovo\Anaconda3\lib\site‑packages\IPython\core\oinspect.py", line 29, in
from IPython.lib.pretty import pretty
File "C:\Users\Lenovo\Anaconda3\lib\site‑packages\IPython\lib\pretty.py", line 82, in
import datetime
File "C:\Users\Lenovo\datetime.py", line 7, in
import sqlite3
File "C:\Users\Lenovo\Anaconda3\lib\sqlite3_init_.py", line 23, in
from sqlite3.dbapi2 import *
File "C:\Users\Lenovo\Anaconda3\lib\sqlite3\dbapi2.py", line 35, in
Date = datetime.date
AttributeError: module 'datetime' has no attribute 'date'

@asdso Read literally any of my previous messages for why this is happening. This is a basic user error on with Python.

File "C:\Users\Lenovo\datetime.py", line 7, in

Remove or rename this file you created which is conflicting with Python's built-in module names and causing this problem.

Hi I am getting this error. How to resolve this?
Traceback (most recent call last):
File "C:\Users\CVR_EXT\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\CVR_EXT\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\CVR_EXT\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\CVR_EXT\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 306, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\CVR_EXT\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\CVR_EXT\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 484, in initialize
self.init_kernel()
File "C:\Users\CVR_EXT\Anaconda3\lib\site‑packages\ipykernel\kernelapp.py", line 389, in init_kernel
user_ns=self.user_ns,
File "C:\Users\CVR_EXT\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\CVR_EXT\Anaconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\CVR_EXT\Anaconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\CVR_EXT\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\CVR_EXT\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 693, in init
self.init_magics()
File "C:\Users\CVR_EXT\Anaconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\CVR_EXT\Anaconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2245, in init_magics
m.PylabMagics, m.ScriptMagics,
File "C:\Users\CVR_EXT\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 405, in register
m = m(shell=self.shell)
File "C:\Users\CVR_EXT\Anaconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\CVR_EXT\Anaconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\CVR_EXT\Anaconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\CVR_EXT\Anaconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\CVR_EXT\Anaconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\CVR_EXT\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\CVR_EXT\Anaconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\CVR_EXT\Anaconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\CVR_EXT\Anaconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\CVR_EXT\Anaconda3\lib\sre_parse.py", line 402, in _escape
raise source.error("bad escape %s" % escape, len(escape))
re.error: bad escape \P at position 52

Hi, even after reinstalling anaconda I'm getting the error stated below. Can someone help me resolve this issue? Thanks in advance
Traceback (most recent call last):
File "C:\Users\bbachegowda\AppData\Local\Continuum\anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "C:\Users\bbachegowda\AppData\Local\Continuum\anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\bbachegowda\AppData\Local\Continuum\anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\bbachegowda\AppData\Local\Continuum\anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 287, in main
import_spydercustomize()
File "C:\Users\bbachegowda\AppData\Local\Continuum\anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 39, in import_spydercustomize
import spydercustomize
File "C:\Users\bbachegowda\AppData\Local\Continuum\anaconda3\lib\site‑packages\spyder_kernels\customize\spydercustomize.py", line 27, in
from IPython.core.getipython import get_ipython
File "C:\Users\bbachegowda\AppData\Local\Continuum\anaconda3\lib\site‑packages\IPython_init.py", line 54, in
from .core.application import Application
File "C:\Users\bbachegowda\AppData\Local\Continuum\anaconda3\lib\site‑packages\IPython\core\application.py", line 23, in
from traitlets.config.application import Application, catch_config_error
File "C:\Users\bbachegowda\AppData\Local\Continuum\anaconda3\lib\site‑packages\traitlets\config_init_.py", line 6, in
from .application import *
File "C:\Users\bbachegowda\AppData\Local\Continuum\anaconda3\lib\site‑packages\traitlets\config\application.py", line 10, in
import json
File "C:\Users\bbachegowda\json.py", line 12
source = response.read()
^
IndentationError: expected an indented block

@BhavanaBGowda For nearly the dozenth time on this thread, read essentially any of my previous messages for why this is happening, or simply look at the last block in your traceback for the culprit. This is a basic user error that can be trivially fixed by following my simple instructions repeated numerous times previously.
@ccordoba12 Is there any way to make it so that the current directory is not higher in the module search path than the user's actual installed packages, at least when initializing the kernel itself (as opposed to running code within it)? I'm not sure there is any realistc scenario where it makes more sense to  have whatever arbitrary user modules happen to be in the current directory shadow builtins and installed packages for the purposes of starting a kernel itself, rather than running the code in the kernel. Thanks.

I solved my problem by importing regex. And using it as re.

Traceback (most recent call last):
File "c:\users\asus1\appdata\local\programs\python\python37\lib\site‑packages\spyder\plugins\ipythonconsole.py", line 1572, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle)
File "c:\users\asus1\appdata\local\programs\python\python37\lib\site‑packages\jupyter_client\manager.py", line 240, in start_kernel
self.write_connection_file()
File "c:\users\asus1\appdata\local\programs\python\python37\lib\site‑packages\jupyter_client\connect.py", line 547, in write_connection_file
kernel_name=self.kernel_name
File "c:\users\asus1\appdata\local\programs\python\python37\lib\site‑packages\jupyter_client\connect.py", line 212, in write_connection_file
with secure_write(fname) as f:
File "c:\users\asus1\appdata\local\programs\python\python37\lib\contextlib.py", line 112, in enter
return next(self.gen)
File "c:\users\asus1\appdata\local\programs\python\python37\lib\site‑packages\jupyter_client\connect.py", line 100, in secure_write
win32_restrict_file_to_user(fname)
File "c:\users\asus1\appdata\local\programs\python\python37\lib\site‑packages\jupyter_client\connect.py", line 53, in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed: %1 is not a valid Win32 application.\
can anyone help me with this?

@jaskaransingh94, you have to install pywin32 with pip to fix that one.

@ccordoba12 i did. installed pywin32 as well as pypiwin32

Probably you installed a 64 bit wheel in a 32 bit system or the other way around. Sorry, I don't have more advice for you.

@ccordoba12 nothing there as well. thank you for the help anyways.

You should use Anaconda instead of a custom installation.

I tried that too, spyder just doesn't fire up with anaconda.
after that, I tried the custom installation that doesn't seem to work either.

@ccordoba12
I have the following error. I tried different things, but still, I get the same error.
Things I tried are:

Updating packages like spyder, spyder-kernels, ipykernel, etc.
Uninstalling and reinstalling Anaconda or Minconda
Uninstalling and deactivating the antivirus and firewall respectively
Cleaning registry and using anaconda-clean package and deleting all folders from the paths.
checking the paths in windows' system
Checking the versions of the Anaconda, Miniconda installed to be compatible with the machine OS (64-bit windows 8.1)
restarting kernel
resetting to factory (Spyder)
trying older versions of Spyder
and a few other things that I do not remember!

An error ocurred while starting the kernel
Traceback (most recent call last):
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\spyder_kernels\console\start.py", line 306, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\ipykernel\kernelapp.py", line 542, in initialize
self.init_kernel()
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\ipykernel\kernelapp.py", line 447, in init_kernel
user_ns=self.user_ns,
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 693, in init
self.init_magics()
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics
super(ZMQInteractiveShell, self).init_magics()
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2246, in init_magics
m.PylabMagics, m.ScriptMagics,
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\IPython\core\magic.py", line 405, in register
m = m(shell=self.shell)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init
self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\sre_parse.py", line 402, in _escape
raise source.error("bad escape %s" % escape, len(escape))
re.error: bad escape \P at position 52

Dependencies:
IPython >=4.0     :  7.8.0 (OK)
cython >=0.21     :  None (NOK)
jedi >=0.9.0      :  0.15.1 (OK)
matplotlib >=2.0.0:  None (NOK)
nbconvert >=4.0   :  5.6.0 (OK)
numpy >=1.7       :  None (NOK)
pandas >=0.13.1   :  None (NOK)
pycodestyle >=2.3 :  2.5.0 (OK)
pyflakes >=0.6.0  :  2.1.1 (OK)
pygments >=2.0    :  2.4.2 (OK)
pylint >=0.25     :  2.4.2 (OK)
qtconsole >=4.2.0 :  4.5.5 (OK)
rope >=0.9.4      :  0.14.0 (OK)
sphinx >=0.6.6    :  2.2.0 (OK)
sympy >=0.7.3     :  None (NOK)

@ccordoba12
I have the following error. I tried different things, but still, I get the same error.
Things I tried are:
* Updating packages like spyder, spyder-kernels, ipykernel, etc.

* Uninstalling and reinstalling Anaconda or Minconda

* Uninstalling and deactivating the antivirus and firewall respectively

* Cleaning registry and using anaconda-clean package and deleting all folders from the paths.

* checking the paths in windows' system

* Checking the versions of the Anaconda, Miniconda installed to be compatible with the machine OS (64-bit windows 8.1)

* restarting kernel

* resetting to factory (Spyder)

* trying older versions of Spyder

* and a few other things that I do not remember!

An error ocurred while starting the kernel
Traceback (most recent call last):
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\runpy.py", line 85, in run_code exec(code, run_globals) File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\spyder_kernels\console__main.py", line 11, in
start.main()
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\spyder_kernels\console\start.py", line 306, in main
kernel.initialize()
File "", line 2, in initialize
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\ipykernel\kernelapp.py", line 542, in initialize
self.init_kernel()
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\ipykernel\kernelapp.py", line 447, in init_kernel
user_ns=self.user_ns,
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\spyder_kernels\console\kernel.py", line 37, in init
super(SpyderKernel, self).init(*args, **kwargs)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\ipykernel\ipkernel.py", line 67, in init
kernel = self,
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(args, **kwargs) File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 693, in init self.init_magics() File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\ipykernel\zmqshell.py", line 593, in init_magics super(ZMQInteractiveShell, self).init_magics() File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\IPython\core\interactiveshell.py", line 2246, in init_magics m.PylabMagics, m.ScriptMagics, File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\IPython\core\magic.py", line 405, in register m = m(shell=self.shell) File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\site‑packages\IPython\core\magics\osm.py", line 52, in init self.execre = re.compile(r'(.).(%s)$' % winext,re.IGNORECASE)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\re.py", line 234, in compile
return _compile(pattern, flags)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\sre_parse.py", line 930, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\sre_parse.py", line 816, in _parse
p = _parse_sub(source, state, sub_verbose, nested + 1)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\sre_parse.py", line 426, in _parse_sub
not nested and not items))
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\sre_parse.py", line 507, in _parse
code = _escape(source, this, state)
File "C:\Users\amkh8857\AppData\Local\Continuum\miniconda3\lib\sre_parse.py", line 402, in _escape
raise source.error("bad escape %s" % escape, len(escape))
re.error: bad escape \P at position 52
Dependencies:
IPython >=4.0 : 7.8.0 (OK)
cython >=0.21 : None (NOK)
jedi >=0.9.0 : 0.15.1 (OK)
matplotlib >=2.0.0: None (NOK)
nbconvert >=4.0 : 5.6.0 (OK)
numpy >=1.7 : None (NOK)
pandas >=0.13.1 : None (NOK)
pycodestyle >=2.3 : 2.5.0 (OK)
pyflakes >=0.6.0 : 2.1.1 (OK)
pygments >=2.0 : 2.4.2 (OK)
pylint >=0.25 : 2.4.2 (OK)
qtconsole >=4.2.0 : 4.5.5 (OK)
rope >=0.9.4 : 0.14.0 (OK)
sphinx >=0.6.6 : 2.2.0 (OK)
sympy >=0.7.3 : None (NOK)

Now I tried your suggestion in another post that I made and It worked. Thanks a lot!