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

could not load libtidy --- can't run pytests on windows-latest github action runner #59

Open
ntno opened this issue Jan 11, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ntno
Copy link
Owner

ntno commented Jan 11, 2023

Description

when pytests run on windows-latest github action runner i get the following error:


self = <tidylib.tidy.Tidy object at 0x00000200870C3070>
lib_names = ['libtidy', 'libtidy.so', 'libtidy-0.99.so.0', 'cygtidy-0-99-0', 'tidylib', 'libtidy.dylib', ...]

    def __init__(self, lib_names=None):
        self._tidy = None
        if lib_names is None:
            lib_names = ctypes.util.find_library('tidy') or LIB_NAMES
        if isinstance(lib_names, str):
            lib_names = [lib_names]
        for name in lib_names:
            try:
                self._tidy = load_library(name)
                break
            except OSError:
                continue
        if self._tidy is None:
>           raise OSError(
                "Could not load libtidy using any of these names: "
                + ",".join(lib_names))
E           OSError: Could not load libtidy using any of these names: libtidy,libtidy.so,libtidy-0.99.so.0,cygtidy-0-99-0,tidylib,libtidy.dylib,tidy

.tox\py\lib\site-packages\tidylib\tidy.py:97: OSError

(see attached for full log)

Reproduction

install tidy with soop:

      - if: ${{ matrix.platform == 'windows-latest' }}
        name: Install scoop (Windows)
        uses: MinoruSekine/setup-scoop@main
        with: 
          scoop_update: false
      - if: ${{ matrix.platform == 'windows-latest' }}
        name: Install test requirements (windows)
        run: |
          scoop install tidy

then run pytest from tox.ini:

commands = 
    pytest {tty:--color=yes} tests {posargs}

References

#58
countergram/pytidylib#33

Environment

  • windows-latest github action runner
  • pytidylib-0.3.2.tar.gz (via pip)
  • tidy-5.8.0-win64.zip (via scoop)

from scoop install:

Installing 'tidy' (5.8.0) [64bit] from main bucket
Downloading https://github.com/htacg/tidy-html5/releases/download/5.8.0/tidy-5.8.0-win64.zip (1.3 MB)...
Checking hash of tidy-5.8.0-win64.zip ... ok.
Extracting tidy-5.8.0-win64.zip ... done.
Linking ~\scoop\apps\tidy\current => ~\scoop\apps\tidy\5.8.0
Creating shim for 'tidy'.
'tidy' (5.8.0) was installed successfully!
HTML Tidy for Windows version 5.8.0
@ntno
Copy link
Owner Author

ntno commented Jan 11, 2023

@ntno ntno added the bug Something isn't working label Jan 11, 2023
@ntno ntno changed the title can't run pytests on windows due to problem installing pytidylib could not load libtidy --- can't run pytests on windows-latest github action runner Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant