Closed
Description
- whitebox version:
- Python version: 3.11.6
- Operating System: Linux
Description
I am trying to test a function that uses whitebox with pytest. Tests pass locally but when I run the tests on a CI pipeline (bitbucket) they fail. It appears to be an error with the download and setup. I have tried with different combinations of musl and reset but all fail. CI pipeline is run on linux.
whitebox.download_wbt(
linux_musl=False,
reset=False,
verbose=True,
)
What I Did
See below for snip from CI output.
Downloading WhiteboxTools pre-compiled binary for first time use ...
Downloading WhiteboxTools binary from https://www.whiteboxgeo.com/WBT_Linux/WhiteboxTools_linux_amd64.zip
Decompressing WhiteboxTools_linux_amd64.zip ...
Unexpected error: <class 'EOFError'>
.venv/lib/python3.11/site-packages/_pytest/runner.py:341: in from_call
result: Optional[TResult] = func()
.venv/lib/python3.11/site-packages/_pytest/runner.py:372: in <lambda>
call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
.venv/lib/python3.11/site-packages/_pytest/python.py:531: in collect
self._inject_setup_module_fixture()
.venv/lib/python3.11/site-packages/_pytest/python.py:545: in _inject_setup_module_fixture
self.obj, ("setUpModule", "setup_module")
.venv/lib/python3.11/site-packages/_pytest/python.py:310: in obj
self._obj = obj = self._getobj()
.venv/lib/python3.11/site-packages/_pytest/python.py:528: in _getobj
return self._importtestmodule()
.venv/lib/python3.11/site-packages/_pytest/python.py:617: in _importtestmodule
mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
.venv/lib/python3.11/site-packages/_pytest/pathlib.py:567: in import_path
importlib.import_module(module_name)
/usr/local/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1204: in _gcd_import
???
<frozen importlib._bootstrap>:1176: in _find_and_load
???
<frozen importlib._bootstrap>:1147: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:690: in _load_unlocked
???
.venv/lib/python3.11/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
exec(co, module.__dict__)
whitebox.download_wbt(
.venv/lib/python3.11/site-packages/whitebox/whitebox_tools.py:138: in download_wbt
with zipfile.ZipFile(zip_name, "r") as zip_ref:
/usr/local/lib/python3.11/zipfile.py:1302: in __init__
self._RealGetContents()
/usr/local/lib/python3.11/zipfile.py:1369: in _RealGetContents
raise BadZipFile("File is not a zip file")
E zipfile.BadZipFile: File is not a zip file
Metadata
Metadata
Assignees
Labels
No labels