Skip to content

[macOS] LookupError: unknown encoding: cp936 #1593

@anzhi0708

Description

@anzhi0708

Description

➜  mono ipy.exe
Traceback (most recent call last):
  File "<string>", line 1567, in load_module
  File "<string>", line 596, in _load_module_shim
  File "<string>", line 1210, in load
  File "<string>", line 1190, in _load_unlocked
  File "<string>", line 1119, in _exec
  File "<string>", line 1461, in exec_module
  File "<string>", line 539, in _check_name_wrapper
  File "<string>", line 321, in _call_with_frames_removed
  File "/Library/Frameworks/IronPython.framework/Versions/3.4.0-beta1/Lib/site.py", line 564, in <module>
  File "/Library/Frameworks/IronPython.framework/Versions/3.4.0-beta1/Lib/site.py", line 550, in main
  File "/Library/Frameworks/IronPython.framework/Versions/3.4.0-beta1/Lib/site.py", line 281, in addusersitepackages
  File "/Library/Frameworks/IronPython.framework/Versions/3.4.0-beta1/Lib/site.py", line 257, in getusersitepackages
  File "/Library/Frameworks/IronPython.framework/Versions/3.4.0-beta1/Lib/site.py", line 247, in getuserbase
  File "/Library/Frameworks/IronPython.framework/Versions/3.4.0-beta1/Lib/sysconfig.py", line 595, in get_config_var
  File "/Library/Frameworks/IronPython.framework/Versions/3.4.0-beta1/Lib/sysconfig.py", line 575, in get_config_vars
  File "/Library/Frameworks/IronPython.framework/Versions/3.4.0-beta1/Lib/_osx_support.py", line 393, in customize_config_vars
  File "/Library/Frameworks/IronPython.framework/Versions/3.4.0-beta1/Lib/_osx_support.py", line 135, in _supports_universal_builds
  File "/Library/Frameworks/IronPython.framework/Versions/3.4.0-beta1/Lib/_osx_support.py", line 103, in _get_system_version
LookupError: unknown encoding: cp936IronPython 3.4.0b1 (3.4.0.0010)
[.NETFramework,Version=v4.6 on Mono 6.12.0.182 (tarball Sun Oct  2 19:58:06 UTC 2022) (64-bit)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

Steps to Reproduce

  1. Install the latest .pkg release
  2. Install mono with brew
  3. cd /Library/Frameworks/IronPython.framework/Versions/3.4.0-beta1/bin && mono ./ipy.exe

Expected behavior: No error

Actual behavior: LookupError

Versions

➜  mono ipy.exe -V
IronPython 3.4.0b1
➜  mono -V
Mono JIT compiler version 6.12.0.182 (tarball Sun Oct  2 19:58:06 UTC 2022)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug
	Interpreter:   yes
	LLVM:          supported, not enabled.
	Suspend:       hybrid
	GC:            sgen (concurrent by default)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions