[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2021-12-13 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 nosy_count: 5.0 -> 6.0 pull_requests: +28310 pull_request: https://github.com/python/cpython/pull/30082 ___ Python tracker ___ __

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2019-04-17 Thread Rudolph Froger
Rudolph Froger added the comment: Thanks all for the fixes! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2019-04-17 Thread STINNER Victor
STINNER Victor added the comment: Thanks Rudolph Froger for the bug report: the issue is now fixed in 3.7 and master (future Python 3.8) branches. Sorry for the delay. -- Alexey Izbyshev wrote PR 5773 to also use fstat() on Linux. I chose to merge my PR 12852 which is more conservative: it

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2019-04-17 Thread STINNER Victor
STINNER Victor added the comment: In short, Python 2.7 doesn't seem to be affected by fstat/dup issues. Python 2.7 doesn't check if file descriptors 0, 1 and 2 at startup. Python 2 uses PyFile_FromFile() to create sys.stdin, sys.stdout and sys.stderr which create a "file" object. The functio

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2019-04-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset b87a8073db73f9ffa96104e00c624052e34b11c7 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-32849: Fix is_valid_fd() on FreeBSD (GH-12852) (GH-12863) https://github.com/python/cpython/commit/b87a8073db73f9ffa96104e00c624052e34b11c7

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2019-04-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3092d6b2630e4d2bd200fbc3231c27a7cba4d6b2 by Victor Stinner in branch 'master': bpo-32849: Fix is_valid_fd() on FreeBSD (GH-12852) https://github.com/python/cpython/commit/3092d6b2630e4d2bd200fbc3231c27a7cba4d6b2 -- ___

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2019-04-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +12790 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2019-04-16 Thread STINNER Victor
STINNER Victor added the comment: Alexey Izbyshev: "I think that we can even drop dup-based validation from is_valid_fd() since there is a corner case for Linux too: if a descriptor opened with O_PATH inherited as a standard one, dup() will succeed but fstat() will fail in kernels before 3.6.

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2019-04-16 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +12778 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2019-04-16 Thread STINNER Victor
STINNER Victor added the comment: > ktrace shows that dup(0) succeeded but fstat(0) failed. Aha, the problem is still the is_valid_fd() function: /* Prefer dup() over fstat(). fstat() can require input/output whereas dup() doesn't, there is a low risk of EMFILE/ENFILE at Python

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2019-04-02 Thread Владислав Ярмак
Владислав Ярмак added the comment: I have similar crash with Python 3.7.2 on Linux. Steps to reproduce: send sigint when Python initializes. I've built debug version of Python 3.7.2 and collected core dump: (gdb) thread apply all bt Thread 1 (Thread 0x7f8f5ee67e80 (LWP 13285)): #0 __GI_rais

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2018-02-20 Thread Rudolph Froger
Rudolph Froger added the comment: > Could it be simply because daemon is respawned from a process that does have > a valid stdin at the time of respawn? Yes, that could certainly be the case. Thanks! -- ___ Python tracker

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2018-02-20 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- keywords: +patch pull_requests: +5552 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2018-02-20 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: > But I'm not sure why it can be solved, sometimes, by restarting the the > daemon. Could it be simply because daemon is respawned from a process that does have a valid stdin at the time of respawn? Note that daemon has an option to redirect std streams to

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2018-02-20 Thread Rudolph Froger
Rudolph Froger added the comment: Thanks for all the research! My crashing Python process is started by a shell process which is launched by the Freebsd daemon tool, this might explain why stdin in no longer valid. But I'm not sure why it can be solved, sometimes, by restarting the the daemon

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2018-02-19 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: OK, never mind with the test. I've finally got to a FreeBSD box and reproduced the problem. It has to do with 'revoke' feature of *BSD. When revoke is called on a terminal device (as part of logout process, for example), all descriptors associated with it ar

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2018-02-19 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: > I think that we can even drop dup-based validation from is_valid_fd() For POSIX, that is. There is no fstat on Windows, and dup is probably OK there (or, even better, dup2(fd, fd) -- no need to close). -- ___ Py

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2018-02-19 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Thank you for checking. If this issue happens even when Python is run manually from an ordinary shell, fixing it in the same way as in #30225 is probably not what you want because while the error message will be gone the corresponding std stream will be None

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2018-02-18 Thread Rudolph Froger
Rudolph Froger added the comment: I've tried your quick tests a few times but couldn't reproduce it immediately. The problem is a bit hard to reproduce anyway because launching Python processes can go well for a long time (many days; launching many processes every minute) until suddenly all N

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2018-02-17 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: ktrace shows that dup(0) succeeded but fstat(0) failed. The symptom is the same as in #30225. Could you check whether any of the following quick tests produces the same error? python3 -c 'import os, subprocess, sys; r, w = os.pipe(); os.close(w); subprocess

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2018-02-15 Thread Rudolph Froger
Change by Rudolph Froger : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2018-02-15 Thread Rudolph Froger
erity: normal status: open title: Fatal Python error: Py_Initialize: can't initialize sys standard streams versions: Python 3.6 Added file: https://bugs.python.org/file47444/alles-23978 ___ Python tracker <https:

[issue8693] Py_Initialize: can't initialize sys standard streams

2010-05-12 Thread Muhammad Bashir Al-Noimi
Muhammad Bashir Al-Noimi added the comment: Lie Ryan gave me the solution, copy http://svn.python.org/view/python/branches/py3k/Lib/encodings/cp720.py?view=markup to Python31\Lib\encodings -- ___ Python tracker

Py_Initialize: can't initialize sys standard streams

2010-05-12 Thread M. Bashir Al-Noimi
Hi All, After installing python-3.1.2.msi I'm not able to run to python.exe at all because it gives me the following error message: Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding: cp720 This application has requested the

[issue8693] Py_Initialize: can't initialize sys standard streams

2010-05-11 Thread Muhammad Bashir Al-Noimi
Muhammad Bashir Al-Noimi added the comment: Thanks and I'm very sorry for disturbance I'll try to get help through mailing list you've mentioned -- ___ Python tracker ___ __

[issue8693] Py_Initialize: can't initialize sys standard streams

2010-05-11 Thread Martin v . Löwis
Martin v. Löwis added the comment: Please trust me that this *is* a duplicate issue. This bug tracker is not a place to get help; it is a place to report bugs. The bug you are reporting has been reported before. Other duplicate reports are #6995, #7496, #7600, #8120. If you want help, contac

[issue8693] Py_Initialize: can't initialize sys standard streams

2010-05-11 Thread Muhammad Bashir Al-Noimi
the following error: --- Fatal Python error: Py_Initialize: can't initialize sys standard streams Traceback (most recent call last): File "C:\Python31\lib\encodings\__init__.py", line 98, in search_function level=0) File "C:\Python31\lib\encodings\cp720.py", li

[issue8693] Py_Initialize: can't initialize sys standard streams

2010-05-11 Thread Muhammad Bashir Al-Noimi
Muhammad Bashir Al-Noimi added the comment: humm I re-read issue1616979 I'm confused is it really duplicate issue? if yes I couldn't find the way for fixing in issue1616979 PS I'm newbie in Python and I faced this problem in first day I use Python so please forgive me if my discussion is stu

[issue8693] Py_Initialize: can't initialize sys standard streams

2010-05-11 Thread Muhammad Bashir Al-Noimi
Muhammad Bashir Al-Noimi added the comment: This is the file I'm adding for removing warning message which is not the reason of crashing -- Added file: http://bugs.python.org/file17303/cp720.py ___ Python tracker

[issue8693] Py_Initialize: can't initialize sys standard streams

2010-05-11 Thread Muhammad Bashir Al-Noimi
Changes by Muhammad Bashir Al-Noimi : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8693] Py_Initialize: can't initialize sys standard streams

2010-05-11 Thread Muhammad Bashir Al-Noimi
Muhammad Bashir Al-Noimi added the comment: No No, this isn't duplicated issue because if I copied cp720.py to Python31\Lib\encodings Python still crashed and gives me the following error Fatal Python error: Py_Initialize: can't initialize sys standard streams TypeError:

[issue8693] Py_Initialize: can't initialize sys standard streams

2010-05-11 Thread Martin v . Löwis
Martin v. Löwis added the comment: This is a duplicate of issue1616979. -- nosy: +loewis resolution: -> duplicate status: open -> closed superseder: -> cp720 encoding map ___ Python tracker __

[issue8693] Py_Initialize: can't initialize sys standard streams

2010-05-11 Thread Muhammad Bashir Al-Noimi
Muhammad Bashir Al-Noimi added the comment: I uninstalled python-2.6.3 before installing python-3.1.2.msi -- ___ Python tracker ___ __

[issue8693] Py_Initialize: can't initialize sys standard streams

2010-05-11 Thread Muhammad Bashir Al-Noimi
New submission from Muhammad Bashir Al-Noimi : After installing python-3.1.2.msi I'm not able to run to python.exe at all because it gives me the following error message: Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding: c

[issue6348] solaris/aix: Py_Initialize: can't initialize sys standard streams

2009-09-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> duplicate status: open -> closed superseder: -> os.popen causes illegal seek on AIX in Python 3.1rc ___ Python tracker ___

[issue6348] solaris/aix: Py_Initialize: can't initialize sys standard streams

2009-07-09 Thread nestor
est test_fileio failed -- Traceback (most recent call last): File "/datawhse/test/data/export/ptst/Python-3.1/Lib/test/test_fileio.py", line 262, in testAbles self.assertEquals(f.seekable(), False) AssertionError: True != False test_httpservers Fatal Python error: Py_Initialize:

[issue6348] solaris/aix: Py_Initialize: can't initialize sys standard streams

2009-06-29 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: Yes, I get the same "Illegal seek" traceback for nestor's ``os.popen ('cat', 'w')`` even though it happens on all of: solaris10-x86, solaris8-sparc, solaris8-sparc64 and aix5-powerpc. Hmm, so this is a duplicate bug? -- nosy: +nestor

[issue6348] solaris/aix: Py_Initialize: can't initialize sys standard streams

2009-06-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: Is it the same as #6236? -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue6348] solaris/aix: Py_Initialize: can't initialize sys standard streams

2009-06-26 Thread Sridhar Ratnakumar
/python.o \ libpython3.1.a -lresolv -lsocket -lnsl -lintl -lrt - ldl -lm Fatal Python error: Py_Initialize: can't initialize sys standard streams IOError: [Errno 29] Illegal seek *** Error code 134 The following command caused the error: case $MAKEFLAGS in \ *s*) CC='cc