-
Notifications
You must be signed in to change notification settings - Fork 1
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
Issue with extracting whitebox tools #350
Comments
Hi Joe, thanks for posting here - I reran the tests here to ensure that it's not a server issue (doesn't seem to be). Probably worth running it from the command line to verify it's not to do with your interactive python: conda create -n sa python=3.10
conda activate sa
conda install swmmanywhere
pip install swmmanywhere[doc]
python /path/to/extended_demo.py The extended demo runs everything in a temporary directory - this shouldn't be an issue but it can make debugging hard - try removing |
Should also work with a normal python |
Also, make sure you're using |
I'm following your new instructions Barney - but now getting this error, where it's saying the bounding box is too large: 2024/12/05 13:42:37 | Model number: 1 I'm running the code in the example still. Any ideas? |
That's just a warning - it shouldn't be causing an error and eventually running? Are the tests running, see instructions from #351 (below)? conda create -n sa python=3.10
conda activate sa
git clone https://github.com/ImperialCollegeLondon/SWMManywhere.git
cd SWMManywhere
pip install -e .[dev,doc]
pytest |
I've followed the steps above, I'm encountering a FileNotFoundError in pytest while running the extended_demo.py script from the pywbt package. The error occurs when pywbt attempts to set execute permissions on the whitebox_tools executable, but the file is not found at the expected path. This prevents the script from executing successfully. Error Message: _______________ ERROR collecting docs/notebooks/extended_demo.py _______________ Expected Behavior: The script should successfully locate the whitebox_tools executable, set the necessary execute permissions, and proceed with its operations without encountering errors. Actual Behavior: The script fails with a FileNotFoundError, indicating that the whitebox_tools executable does not exist at the specified temporary directory path. Environment: Operating System: macOS (Darwin) |
Thanks for posting that... hmm I am not sure the extended demo actually runs in our tests on |
@joeshuttleworth it didn't reproduce in a generic mac environment, from your terminal could you call |
I think if we can't reproduce it we can at least add a workaround that you can provide the location of the |
extended_demo.py now works for me. The issue was the whitebox tools zip file not being able to be un-zipped. So I downloaded it locally, passed it via config and then updated preprocessing and main swmmanywhere .py files. |
Thanks @joeshuttleworth - sounds like you made a feature! - do you want to make a branch to push your changes to and we can implement them via a pull request? |
I am trying to run the extended demo and running into and issue with the extraction of whitebox.
I have created a new env with python 3.10 and used pip install swmmanywhere [doc]
It is giving me this error message repeatedly:
Downloading WhiteboxTools from https://www.whiteboxgeo.com/WBT_Darwin/WhiteboxTools_darwin_amd64.zip
Failed to extract /var/folders/f4/6cfrn3rs0v137s8kxpcr4k340000gn/T/tmpfe58c9sp/my_first_swmm/bbox_1/download/whiteboxtools_binaries.zip. Redownloading...
Downloading WhiteboxTools from https://www.whiteboxgeo.com/WBT_Darwin/WhiteboxTools_darwin_amd64.zip
Failed to extract /var/folders/f4/6cfrn3rs0v137s8kxpcr4k340000gn/T/tmpfe58c9sp/my_first_swmm/bbox_1/download/whiteboxtools_binaries.zip. Redownloading...
Downloading WhiteboxTools from https://www.whiteboxgeo.com/WBT_Darwin/WhiteboxTools_darwin_amd64.zip
Failed to extract /var/folders/f4/6cfrn3rs0v137s8kxpcr4k340000gn/T/tmpfe58c9sp/my_first_swmm/bbox_1/download/whiteboxtools_binaries.zip.
Which carries on repeatedly. Any ideas on how to solve? Probably a very basic question
The text was updated successfully, but these errors were encountered: