This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Python script is failing to run
Type: crash Stage: resolved
Components: Extension Modules Versions:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Megha, louielu, r.david.murray, serhiy.storchaka
Priority: normal Keywords:

Created on 2017-07-18 14:35 by Megha, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (8)
msg298589 - (view) Author: Megha HR (Megha) Date: 2017-07-18 14:35
Hi,

We are facing below error message whenever we use python.

Could you please let me know root cause and steps to overcome this problem.

./python32.sh
Fatal Python error: Py_Initialize: Unable to get the locale encoding
EOFError: EOF read where not expected
Abort (core dumped)

Python version:

# ./python3.2 -V
Python 3.2.2
root@atclvm820>
msg298590 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-07-18 14:43
Python 3.2 is not supported version. Try to upgrade to newer version.
msg298591 - (view) Author: Megha HR (Megha) Date: 2017-07-18 14:48
Hi Serhiy,

Thanks a lot for your comment.

Yes we do aware that 3.2V is outdated.
Our plan is to upgrade to latest version.

Otherside, It'll be great if you can let us know any root cause for below mentioned error message and how to overcome the same.

./python32.sh
Fatal Python error: Py_Initialize: Unable to get the locale encoding
EOFError: EOF read where not expected
Abort (core dumped)
msg298593 - (view) Author: Louie Lu (louielu) * Date: 2017-07-18 15:02
Your information isn't that clear, this is what I found on the Internet:

https://techglimpse.com/error-executing-python3-5-command-solution/
https://unix.stackexchange.com/questions/17863/py3compile-error-unable-to-get-the-locale-encoding

Maybe your environment variable PYTHONHOME or PYTHONPATH had some problem.
msg298598 - (view) Author: Megha HR (Megha) Date: 2017-07-18 15:26
Thanks louielu for your response.

Yes I did check related to env & its python path, this looks ok.


#!/usr/sunos/bin/sh -x

# This script is a wrapper for the official OSS python

PYTHON=/opt/python/python/python3.2
PYTHON_ENV=/etc/opt/ericsson/3ppenv/python.env

if [ -r $PYTHON_ENV ]; then
  . $PYTHON_ENV && export PYTHONHOME && export PYTHONPATH
  $PYTHON $*
else
  echo "reading $PYTHON_ENV failed"
  exit 1
fi

Do you still suggest to export it again ?

May I know 
in which scenarios
1)We can see the mentioned error message
2) core dump will happen for python?

Appreciate your comment.


Also we can see lots and lots of core files of python;



-rw-------   1 nmsadm   nms      7426844 Jul 14 07:05 python3.2.14513
-rw-------   1 nmsadm   nms      7426844 Jul 14 07:05 python3.2.14551
-rw-------   1 nmsadm   nms      7426844 Jul 14 07:05 python3.2.14651
-rw-------   1 nmsadm   nms      7426844 Jul 14 07:05 python3.2.14739
-rw-------   1 nmsadm   nms      7410460 Jul 14 07:05 python3.2.15279
-rw-------   1 nmsadm   nms      7410460 Jul 14 07:05 python3.2.15291
-rw-------   1 nmsadm   nms      7426844 Jul 14 07:05 python3.2.15290
-rw-------   1 nmsadm   nms      7430940 Jul 14 07:05 python3.2.15288
-rw-------   1 nmsadm   nms      7426844 Jul 14 07:05 python3.2.15368
-rw-------   1 nmsadm   nms      7410460 Jul 14 07:05 python3.2.15374
-rw-------   1 nmsadm   nms      7426844 Jul 14 07:05 python3.2.15575
-rw-------   1 nmsadm   nms      7426844 Jul 14 07:05 python3.2.15641
-rw-------   1 nmsadm   nms      7426844 Jul 14 07:05 python3.2.15792
-rw-------   1 nmsadm   nms      7410460 Jul 14 07:06 python3.2.16645
-rw-------   1 nmsadm   nms      7430940 Jul 14 07:06 python3.2.16652
-rw-------   1 nmsadm   nms      7410460 Jul 14 07:06 python3.2.16728
-rw-------   1 nmsadm   nms      7410460 Jul 14 07:06 python3.2.16895
-rw-------   1 nmsadm   nms      7426844 Jul 14 07:06 python3.2.17082
-rw-------   1 nmsadm   nms      7426844 Jul 14 07:06 python3.2.17273
-rw-------   1 nmsadm   nms      7426844 Jul 14 07:06 python3.2.17305
-rw-------   1 nmsadm   nms      7426844 Jul 14 07:06 python3.2.17365
-rw-------   1 nmsadm   nms      7426844 Jul 14 07:06 python3.2.17462
#date
Tue Jul 18 16:24:44 IST 2017
msg298599 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2017-07-18 15:29
This is a bug tracker for Python.  3.2 is out of maintenance, so such a question is not appropriate for this forum. In any case it is an issue with your install, not with Python itself, so again not appropriate for this forum. You should ask for help on the python-list mailing list, or the #python irc channel on freenode.  

I wish we could help you here, but we need to keep this forum focused on bugs in Python itself.  Please do not reopen the issue.

louielu, if you want to continue to help Megha, which would be great, please take it to private email.
msg298606 - (view) Author: Megha HR (Megha) Date: 2017-07-18 16:58
Hi,

python-list mailing list, or the #python irc channel on freenode.  

May I know python mailing list please?
msg298607 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-07-18 17:09
https://www.python.org/community/lists/
https://www.python.org/community/irc/
History
Date User Action Args
2022-04-11 14:58:49adminsetgithub: 75143
2017-07-18 17:09:46serhiy.storchakasetmessages: + msg298607
2017-07-18 16:58:39Meghasetmessages: + msg298606
2017-07-18 15:29:55r.david.murraysetstatus: open -> closed


messages: + msg298599
nosy: + r.david.murray
2017-07-18 15:26:05Meghasetmessages: + msg298598
2017-07-18 15:02:54louielusetnosy: + louielu
messages: + msg298593
2017-07-18 14:48:46Meghasetstatus: closed -> open

messages: + msg298591
2017-07-18 14:43:29serhiy.storchakasetversions: - Python 3.3
2017-07-18 14:43:16serhiy.storchakasetstatus: open -> closed

nosy: + serhiy.storchaka
messages: + msg298590

resolution: out of date
stage: resolved
2017-07-18 14:35:07Meghacreate