IronLanguages / IronLanguages/ironpython3
[macOS] LookupError: unknown encoding: cp936
Open
Nobody has claimed this yet.
macOS
- Dominant language
- C#
- Stars
- 2.8k
- Forks
- 316
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 1
Description
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
- Install the latest
.pkgrelease - Install
monowithbrew 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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with Mono using the reported ipy.exe command, then inspect Lib/_osx_support.py, Lib/sysconfig.py, and Lib/site.py at the traceback locations. Trace why the macOS startup path requests cp936 and verify that launching IronPython on the reported setup completes without the LookupError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, python
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100