Skip to content

cannot activate a venv environment on a Swiss German windows #79329

Closed

Description

@samstagern
mannequin
BPO 35148
Nosy @vsajip, @eryksun, @samstagern, @moltob
PRs
  • bpo-32409 Ensures activate.bat can handle Unicode contents #10295
  • bpo-35148: fix resetting codepage in activate.bat #10696
  • Superseder
  • bpo-34144: venv activate.bat reset codepage fails on windows 10
  • 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 2019-05-03.19:02:01.711>
    created_at = <Date 2018-11-02.16:39:43.943>
    labels = ['3.7', '3.8', 'type-bug', 'library']
    title = 'cannot activate a venv environment on a Swiss German windows'
    updated_at = <Date 2019-05-03.19:02:01.710>
    user = 'https://github.com/samstagern'

    bugs.python.org fields:

    activity = <Date 2019-05-03.19:02:01.710>
    actor = 'eryksun'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-05-03.19:02:01.711>
    closer = 'eryksun'
    components = ['Library (Lib)']
    creation = <Date 2018-11-02.16:39:43.943>
    creator = 'Martin Bijl-Schwab'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35148
    keywords = ['patch']
    message_count = 5.0
    messages = ['329140', '329145', '329159', '329432', '332182']
    nosy_count = 4.0
    nosy_names = ['vinay.sajip', 'eryksun', 'Martin Bijl-Schwab', 'mpagel']
    pr_nums = ['10295', '10696']
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '34144'
    type = 'behavior'
    url = 'https://bugs.python.org/issue35148'
    versions = ['Python 3.7', 'Python 3.8']

    Activity

    1. samstagern commented on Nov 2, 2018

      samstagernmannequin
      MannequinAuthor

      There is a small bug in the activate.bat script causing problems on internationalized Windows systems.

      C:\repo\gui>python -m venv venv

      C:\repo\gui>call venv\Scripts\activate.bat
      Parameterformat falsch - 850.

      This translates to "Wrong parameter - 850."

      For the user it is not obvious what went wrong.

      The virtual environment is setup and will work in most cases.

      Link to https://bugs.python.org/issue32409.

    2. added
      3.7 (EOL)
      3.8 (EOL)
      stdlib
      type-bug
      on Nov 2, 2018
    3. vsajip commented on Nov 2, 2018

      @vsajip
      Member

      So - are you saying that chcp prints "850." when asked for the current code page but won't accept "850." when setting the code page, requiring just "850"?

    4. eryksun commented on Nov 2, 2018

      @eryksun
      Contributor

      The Windows command line often has inconsistently localized strings. In this case it's from the ulib.dll utility library. For German, message 0x7692 in "de-DE\ulib.dll.mui" is "Aktive Codepage: %1.\r\n", which has a period after the %1 insert. In the English UI it's "Active code page: %1\r\n", with no period. I commented on the PR that we could work around this by adding "." to the list of token delimiters (delims).

    5. vsajip commented on Nov 7, 2018

      @vsajip
      Member

      Fixed, see bpo-32409 for commit information.

    6. reopened this on Nov 16, 2018
    7. moltob commented on Dec 20, 2018

      moltobmannequin
      Mannequin

      Dear developers on the nosy list: Would it be possible that someone does a quick review of my related fix in #10696?

      It is extremely simple and has minimal side effects, but would relieve us from getting this annoying error in the future.

      I know this is a minor thing but each time I start a venv in Germany, I am reminded of this... :-)

      Thanks a lot.

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

      3.7 (EOL)3.8 (EOL)stdlibtype-bug

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions