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

Handle bad paths in sys.path #2383

Merged
merged 1 commit into from
May 11, 2024
Merged

Conversation

lostmsu
Copy link
Member

@lostmsu lostmsu commented May 10, 2024

What does this implement/fix? Explain your changes.

User can add arbitrary strings to sys.path. When we probe for assemblies in sys.path the ones that were not valid paths caused the probing to fail, never reaching the valid ones that actually had the desired assembly.

This change handles these cases by generating a warning and continuing to probe in other directories.

Does this close any currently open issues?

fixes #2376

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change
  • If an enhancement PR, please create docs and at best an example
  • Updated the CHANGELOG

@lostmsu lostmsu force-pushed the bugs/sys.path-invalid branch 3 times, most recently from 3b2958b to eef9619 Compare May 10, 2024 22:23
@filmor filmor merged commit b112885 into pythonnet:master May 11, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System.ArgumentException: Illegal characters in path
2 participants