Skip to content

[bug] CI always shows error: Failed to load Python DLL 'C:\github_repos\casdoor\temp\_MEI22402\python311.dll'. #254

@hsluoyz

Description

@hsluoyz

See: https://github.com/casbin/casbin-editor/actions/runs/17921646568/job/50957894978

      ✓ should return consistent enforcement result for ReBAC with rust engine (5510 ms)
      ✕ should return consistent enforcement result for ReBAC with python engine (13418 ms)
      ✓ should return consistent enforcement result for ReBAC with dotnet engine (9896 ms)
      ✓ should return consistent enforcement result for ABAC with java engine (2504 ms)
      ✓ should return consistent enforcement result for ABAC with go engine (844 ms)
      ✓ should return consistent enforcement result for ABAC with rust engine (841 ms)
      ✓ should return consistent enforcement result for ABAC with python engine (5065 ms)
      ✓ should return consistent enforcement result for ABAC with dotnet engine (1513 ms)
      ✓ should return consistent enforcement result for ABAC with policy rule with java engine (1535 ms)
      ✓ should return consistent enforcement result for ABAC with policy rule with go engine (428 ms)
      ✓ should return consistent enforcement result for ABAC with policy rule with rust engine (423 ms)
      ✓ should return consistent enforcement result for ABAC with policy rule with python engine (8825 ms)
      ✓ should return consistent enforcement result for ABAC with policy rule with dotnet engine (772 ms)
      ✓ should return consistent enforcement result for PBAC with java engine (17504 ms)
      ✓ should return consistent enforcement result for PBAC with go engine (6072 ms)
      ✓ should return consistent enforcement result for PBAC with rust engine (5871 ms)
      ✕ should return consistent enforcement result for PBAC with python engine (7155 ms)
      ✓ should return consistent enforcement result for PBAC with dotnet engine (9767 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch) with java engine (1400 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch) with go engine (427 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch) with rust engine (436 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch) with python engine (2729 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch) with dotnet engine (682 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch2) with java engine (2758 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch2) with go engine (856 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch2) with rust engine (898 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch2) with python engine (5078 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch2) with dotnet engine (1340 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch3) with java engine (2383 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch3) with go engine (843 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch3) with rust engine (839 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch3) with python engine (5098 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch3) with dotnet engine (1445 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch4) with java engine (2698 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch4) with go engine (861 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch4) with rust engine (849 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch4) with python engine (9587 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch4) with dotnet engine (1331 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch5) with java engine (2353 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch5) with go engine (838 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch5) with rust engine (825 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch5) with python engine (4909 ms)
      ✓ should return consistent enforcement result for RESTful (KeyMatch5) with dotnet engine (2247 ms)
      ✓ should return consistent enforcement result for IP match with java engine (2858 ms)
      ✓ should return consistent enforcement result for IP match with go engine (854 ms)
      ✓ should return consistent enforcement result for IP match with rust engine (840 ms)
      ✓ should return consistent enforcement result for IP match with python engine (5116 ms)
      ✓ should return consistent enforcement result for IP match with dotnet engine (1471 ms)
      ✓ should return consistent enforcement result for Priority with java engine (1310 ms)
      ✓ should return consistent enforcement result for Priority with go engine (423 ms)
      ✓ should return consistent enforcement result for Priority with rust engine (432 ms)
      ✓ should return consistent enforcement result for Priority with python engine (3766 ms)
      ✓ should return consistent enforcement result for Priority with dotnet engine (670 ms)

  ● Casbin Engine Tests › Cross-engine enforcement consistency › should return consistent enforcement result for RBAC with resource roles with python engine

    Traceback (most recent call last):
      File "client.py", line 5, in <module>
      File "PyInstaller\loader\pyimod02_importers.py", line 457, in exec_module
      File "enforcer_factory.py", line 1, in <module>
      File "PyInstaller\loader\pyimod02_importers.py", line 457, in exec_module
      File "casbin\__init__.py", line 15, in <module>
      File "PyInstaller\loader\pyimod02_importers.py", line 457, in exec_module
      File "casbin\enforcer.py", line 17, in <module>
      File "PyInstaller\loader\pyimod02_importers.py", line 457, in exec_module
      File "casbin\management_enforcer.py", line 15, in <module>
      File "PyInstaller\loader\pyimod02_importers.py", line 457, in exec_module
      File "casbin\internal_enforcer.py", line 15, in <module>
      File "PyInstaller\loader\pyimod02_importers.py", line 457, in exec_module
      File "casbin\core_enforcer.py", line 25, in <module>
      File "PyInstaller\loader\pyimod02_importers.py", line 457, in exec_module
      File "casbin\util\log.py", line 2, in <module>
      File "PyInstaller\loader\pyimod02_importers.py", line 457, in exec_module
      File "logging\config.py", line 30, in <module>
      File "PyInstaller\loader\pyimod02_importers.py", line 457, in exec_module
      File "logging\handlers.py", line 26, in <module>
      File "PyInstaller\loader\pyimod02_importers.py", line 457, in exec_module
      File "socket.py", line 51, in <module>
    ImportError: DLL load failed while importing _socket: The process cannot access the file because it is being used by another process.
    [PYI-12912:ERROR] Failed to execute script 'client' due to unhandled exception!
    , error: exit status 1

      61 |
      62 |       if (result.error) {
    > 63 |         throw new Error(result.error);
         |               ^
      64 |       }
      65 |
      66 |       return {

      at RemoteCasbinEngine.<anonymous> (app/components/editor/core/CasbinEngine.ts:63:15)
      at fulfilled (app/components/editor/core/CasbinEngine.ts:5:58)

  ● Casbin Engine Tests › Cross-engine enforcement consistency › should return consistent enforcement result for ReBAC with python engine

    [PYI-12540:ERROR] Failed to load Python DLL 'C:\github_repos\casdoor\temp\_MEI22402\python311.dll'.
    LoadLibrary: The process cannot access the file because it is being used by another process.

    , error: exit status 0xffffffff

      61 |
      62 |       if (result.error) {
    > 63 |         throw new Error(result.error);
         |               ^
      64 |       }
      65 |
      66 |       return {

      at RemoteCasbinEngine.<anonymous> (app/components/editor/core/CasbinEngine.ts:63:15)
      at fulfilled (app/components/editor/core/CasbinEngine.ts:5:58)

  ● Casbin Engine Tests › Cross-engine enforcement consistency › should return consistent enforcement result for PBAC with python engine

    [PYI-6388:ERROR] Failed to load Python DLL 'C:\github_repos\casdoor\temp\_MEI151042\python311.dll'.
    LoadLibrary: The process cannot access the file because it is being used by another process.

    , error: exit status 0xffffffff

      61 |
      62 |       if (result.error) {
    > 63 |         throw new Error(result.error);
         |               ^
      64 |       }
      65 |
      66 |       return {

      at RemoteCasbinEngine.<anonymous> (app/components/editor/core/CasbinEngine.ts:63:15)
      at fulfilled (app/components/editor/core/CasbinEngine.ts:5:58)

Test Suites: 1 failed, 1 total
Tests:       3 failed, 147 passed, 150 total
Snapshots:   0 total
Time:        582.147 s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.
Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions