Skip to content

Py_Initialize: can't initialize sys standard streams #52939

Closed

Description

@mbnoimi
mannequin
BPO 8693
Nosy @loewis
Superseder
  • bpo-1616979: cp720 encoding map
  • Files
  • error.log
  • cp720.py
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2010-05-12.06:29:25.287>
    created_at = <Date 2010-05-12.03:25:16.712>
    labels = ['OS-windows', 'type-crash']
    title = "Py_Initialize: can't initialize sys standard streams"
    updated_at = <Date 2010-05-12.11:33:30.271>
    user = 'https://bugs.python.org/mbnoimi'

    bugs.python.org fields:

    activity = <Date 2010-05-12.11:33:30.271>
    actor = 'mbnoimi'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-05-12.06:29:25.287>
    closer = 'loewis'
    components = ['Windows']
    creation = <Date 2010-05-12.03:25:16.712>
    creator = 'mbnoimi'
    dependencies = []
    files = ['17302', '17303']
    hgrepos = []
    issue_num = 8693
    keywords = []
    message_count = 10.0
    messages = ['105566', '105567', '105569', '105570', '105571', '105572', '105573', '105575', '105576', '105581']
    nosy_count = 2.0
    nosy_names = ['loewis', 'mbnoimi']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '1616979'
    type = 'crash'
    url = 'https://bugs.python.org/issue8693'
    versions = ['Python 3.1']

    Activity

    1. mbnoimi commented on May 12, 2010

      mbnoimimannequin
      MannequinAuthor

      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 Runtime to terminate it in an unusual way.
      Please contact the application's support team for more information.

      PS
      * I'm using WinXp SP3 32Bit

    2. added
      type-crash
      on May 12, 2010
    3. mbnoimi commented on May 12, 2010

      mbnoimimannequin
      MannequinAuthor

      I uninstalled python-2.6.3 before installing python-3.1.2.msi

    4. loewis commented on May 12, 2010

      loewismannequin
      Mannequin

      This is a duplicate of bpo-1616979.

    5. mbnoimi commented on May 12, 2010

      mbnoimimannequin
      MannequinAuthor

      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: 'NoneType' object is not callable

      This application has requested the Runtime to terminate it in an unusual way.
      Please contact the application's support team for more information.

    6. mbnoimi commented on May 12, 2010

      mbnoimimannequin
      MannequinAuthor

      This is the file I'm adding for removing warning message which is not the reason of crashing

    7. mbnoimi commented on May 12, 2010

      mbnoimimannequin
      MannequinAuthor

      humm I re-read bpo-1616979

      I'm confused is it really duplicate issue? if yes I couldn't find the way for fixing in bpo-1616979

      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 stupid.

    8. mbnoimi commented on May 12, 2010

      mbnoimimannequin
      MannequinAuthor

      For fixing this issue I tried to following:

      1. Installed python-2.6.3.msi
      2. Downloaded cp720.py, genwincodec.py from http://svn.python.org/view?rev=74000&view=rev
      3. Copied cp720.py it to Python31\Lib\encodings
      4. Run Python31\python.exe I got 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", line 50
          u'\x00'     #  0x00 -> CONTROL CHARACTER
                ^
      SyntaxError: invalid syntax

      This application has requested the Runtime to terminate it in an unusual way.
      Please contact the application's support team for more information.
      ---
      5) copied genwincodec.py to Python26
      6) Run C:\Python26>python.exe genwincodec.py 720 1>C:\Python31\Lib\encodings\cp720.py I got the following error message:
      ---

      Traceback (most recent call last):
        File "genwincodec.py", line 8, in <module>
          from gencodec import codegen
      ImportError: No module named gencodec

      What's wrong? that's really exhausted! I didn't face this problem with any programming language before (I'm C++/Qt developer)

    9. loewis commented on May 12, 2010

      loewismannequin
      Mannequin

      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 bpo-6995, bpo-7496, bpo-7600, bpo-8120.

      If you want help, contact python-list@python.org (aka news:comp.lang.python).

    10. mbnoimi commented on May 12, 2010

      mbnoimimannequin
      MannequinAuthor

      Thanks and I'm very sorry for disturbance I'll try to get help through mailing list you've mentioned

    11. mbnoimi commented on May 12, 2010

      mbnoimimannequin
      MannequinAuthor

      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

    12. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      OS-windowstype-crash

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions