-
Notifications
You must be signed in to change notification settings - Fork 42
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
Some modules are not successfully loaded by 'import pythonmonkey' on windows #445
Comments
Check for Windows drive letters only checked for CAPS but Windows fs is case insensitive Thank you to jacalata Distributive-Network/PythonMonkey#445 Co-authored-by: Jac <jacalata@users.noreply.github.com>
Awesome bug report @jacalata! I filed a PR on I'll keep this issue open while this remains an issue on PythonMonkey |
How to install pythonmonkey with this commit applied? |
@wesgarland @Xmader would you mind reviewing this wesgarland/ctx-module#9 when you have the time? |
@wiwichips I reviewed this and it works perfectly on Windows :) imho you can merge it |
@wesgarland @Xmader -- Please check out my PR on |
Thanks @wiwichips and @mxrch! I believe only @wesgarland can merge it. |
@Xmader would you mind asking Wes to merge it, after you review it. It may possibly affect Bifrost2 on Windows |
Issue type
Bug
How did you install PythonMonkey?
Installed from pip
OS platform and distribution
Windows 11
Python version (
python --version
)3.12
PythonMonkey version (
pip show pythonmonkey
)1.0.0
Bug Description
I debugged through this and eventually found that in ctx-module.js::219 there is a regex check for whether the file path is absolute
Unfortunately on Windows, drive letters may be lowercase, and this was not caught by the regex.
existing code:
if (moduleIdentifier[0] === '/' || moduleIdentifier.match(/^[A-Z]:[/\]/)) // absolute paths
my local fix:
if (moduleIdentifier[0] === '/' || moduleIdentifier.match(/^[A-Za-z]:[/\]/)) // absolute paths
Standalone code to reproduce the issue
Relevant log output or backtrace
Additional info if applicable
No response
What branch of PythonMonkey were you developing on? (If applicable)
No response
The text was updated successfully, but these errors were encountered: