Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Windows 10, lldb gets error regarding module encodings #58447

Closed
gandalfas opened this issue Apr 27, 2022 · 2 comments
Closed

On Windows 10, lldb gets error regarding module encodings #58447

gandalfas opened this issue Apr 27, 2022 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. cloned Resolution: Was resubmitted in the appropriate repository rather than transferred documentation inaccurate info Bug → documentation: Inaccurate info † website This issue was supposed to belong in the swift-org-website repository Windows Platform: Windows

Comments

@gandalfas
Copy link

This is due to a "bug" in the Swift installation procedure for Windows 10. Below, after describing the issue, I have a solution. I am new at Swift, and other thoughts are welcome!

Environment

build number: Swift 5.6.1
OS: Windows 10 desktop computer

Issue Description

On Windows 10, lldb gets error: Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding. error: ModuleNotFoundError: No module named 'encodings'

Test Case

After an install of Swift on Windows 10, run 'lldb Factorial' as shown on Swift - Getting Started > Using the LLDB Debugger. That elicits the error above.

Cause

The env var PYTHONPATH is missing the Python directory: (your-Python-root)\Lib.

Solution

See notes on PYTHONPATH in #58438.

@gandalfas gandalfas added the bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. label Apr 27, 2022
@shahmishal shahmishal added the Windows Platform: Windows label Apr 28, 2022
@gandalfas
Copy link
Author

closing. I provided the solution right within the issue. I am accepting my own solution.

(Perhaps I should have kept the solution out of the initial issue, and then provided the solution immediately afterward?)

@AnthonyLatsis
Copy link
Collaborator

Resubmitted as part of swiftlang/swift-org-website/issues/287.

@AnthonyLatsis AnthonyLatsis closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2023
@AnthonyLatsis AnthonyLatsis added duplicate Resolution: Duplicates another issue † website This issue was supposed to belong in the swift-org-website repository inaccurate info Bug → documentation: Inaccurate info documentation cloned Resolution: Was resubmitted in the appropriate repository rather than transferred and removed duplicate Resolution: Duplicates another issue labels Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. cloned Resolution: Was resubmitted in the appropriate repository rather than transferred documentation inaccurate info Bug → documentation: Inaccurate info † website This issue was supposed to belong in the swift-org-website repository Windows Platform: Windows
Projects
None yet
Development

No branches or pull requests

3 participants