yglukhov / nimpy

Nim - Python bridge
MIT License
1.46k stars 62 forks source link

tcustommodulename fails in Windows #249

Closed juancarlospaco closed 2 years ago

juancarlospaco commented 2 years ago

Python versions "2.7", "3.8", "3.9", "3.10" in Windows are failing Tests, they are available in GitHub Actions CI, the CI is more strict and found bugs in the code for specific Python versions, the error is:

Traceback (most recent call last):
  File "tests\tcustommodulename.py", line 3, in <module>
    import _mycustommodulename

ImportError: DLL load failed while importing _mycustommodulename: The specified module could not be found.

stack trace: (most recent call last)
C:\Users\RUNNER~1\AppData\Local\Temp\nimblecache-0\nimscriptapi_455785573.nim(187, 16)
D:\a\nimpy\nimpy\nimpy.nimble(83, 11) testTask
D:\a\nimpy\nimpy\nimpy.nimble(71, 11) runTests
C:\Users\runneradmin\.choosenim\toolchains\nim-1.6.2\lib\system\nimscript.nim(273, 7) exec
C:\Users\runneradmin\.choosenim\toolchains\nim-1.6.2\lib\system\nimscript.nim(273, 7) Error: unhandled exception: FAILED: python3 tests\tcustommodulename.py [OSError]

running: python3 tests\tcustommodulename.py
Error: Process completed with exit code 1.

Looks like Python can not import _mycustommodulename module in Windows for some reason.

Add "2.7", "3.8", "3.9", "3.10" to the YAML to reproduce the bug.

See https://github.com/yglukhov/nimpy/pull/248

yglukhov commented 2 years ago

Duplicate of #203

juancarlospaco commented 2 years ago

But what would be the solution here ?, maybe add a when not defined(windows): to that test ?.

yglukhov commented 2 years ago

253

juancarlospaco commented 2 years ago

Cool!. 🙂:+1: