Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPython crashes on windows server with locale.setlocale #14408

Open
mhechthz opened this issue Apr 18, 2024 · 1 comment
Open

IPython crashes on windows server with locale.setlocale #14408

mhechthz opened this issue Apr 18, 2024 · 1 comment

Comments

@mhechthz
Copy link

Working with Spyder or directly IPython on Windows Server 2019 we face the problem, that with Python 3.11.8 as well as Python 3.12.3 on this code the IPython environment crashes. Code:

import time
import locale

locale.setlocale(locale.LC_ALL,"de_DE.UTF-8")

print(time.localtime())

Message in IPython spyder (varies, last is restart kernel):

Windows fatal exception: code 0xc0000374

Main thread:
Current thread 0x00025920 (most recent call first):
  File "c:\users\di29394\.spyder-py3\temp.py", line 13 in <module>
  File "C:\Python\Python312\Lib\site-packages\spyder_kernels\py3compat.py", line 356 in compat_exec
  File "C:\Python\Python312\Lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 473 in exec_code
  File "C:\Python\Python312\Lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 615 in _exec_file
  File "C:\Python\Python312\Lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 528 in runfile
  File "C:\Users\di29394\AppData\Local\Temp\20\ipykernel_127360\4017716904.py", line 1 in <module>

Kernel wird neu gestartet...

On commandline IPython exits with no message. The crashing command is the access to time.localtime().

@mhechthz mhechthz changed the title IPython crashed on windows server with locale.setlocale IPython crashes on windows server with locale.setlocale Apr 18, 2024
@mhechthz
Copy link
Author

It seems that it works with locale.setlocale(locale.LC_ALL,"deu_deu"). Setting e.g. locale.setlocale(locale.LC_ALL,"xy_xy") crashed again, so it obviously crashes on wrong or non-existing locale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant