OpenDroneMap / WebODM

User-friendly, commercial-grade software for processing aerial imagery. 🛩
https://www.opendronemap.org/webodm/
GNU Affero General Public License v3.0
2.87k stars 957 forks source link

Unable to execute GRASS script errors on plugins in fresh installation of WebODM running in Docker on MacOS #917

Closed taue2512 closed 4 years ago

taue2512 commented 4 years ago

After having installed WebODM using the preconfigured WebODM Manager 1.2 on MacOS 10.15.7 inside a Docker environment, I am facing the following issues and error messages while using the two plugins - the rest of the installation works flawlessly:

What's your browser and operating system? (Copy/paste the output of https://www.whatismybrowser.com/) Chrome 85 on macOS (Catalina)

What is the problem? Plugins using GRASS scripts could not be executed without errors on fresh install of WebODM

What should be the expected behavior? Elevation Map and Change Detection plugins shall work.

How can we reproduce this? (What steps did you do to trigger the problem? What parameters are you using for processing? Please include multiple screenshots of the problem! If possible please include a copy of your dataset uploaded on Google Drive or Dropbox. Be detailed) I've downloaded and installed WebODM using the WebODM Manager 1.2 (.dmg) on MacOS Catalina. Docker is updated to latest version 2.3.0.5 (but issue happened also in previous release). WebODM update was initiated using WebODM Manager's integrated UPGRADE function. Plugins have been activated using the administrative GUI of WebODM in the browser and allprerequistes have been met (two projects with DSMs for "changedetection" plugin). Once having clicked on the two plugins, "Preview" triggers the errors mentioned below.

Plugin Elevation Map (elevationmap 1.0.0): Could not execute GRASS script /webodm/plugins/elevationmap/elevationmap.py from /webodm/app/media/tmp/tmpb2jpym48_grass_engine: Starting GRASS GIS... Creating new GRASS GIS location <location>... Cleaning up temporary files... Executing <python /webodm/plugins/elevationmap/elevationmap.py dsm=/webodm/app/media/project/2/task/8d15a99a-63e4-48e4-a564-d3c9de27551b/assets/odm_dem/dsm.tif interval=1 format=GeoJSON noise_filter_size=0.0 epsg=4326> ... Traceback (most recent call last): File "/webodm/plugins/elevationmap/elevationmap.py", line 48, in <module> import cv2, math, argparse ModuleNotFoundError: No module named 'cv2' Execution of <python /webodm/plugins/elevationmap/elevationmap.py dsm=/webodm/app/media/project/2/task/8d15a99a-63e4-48e4-a564-d3c9de27551b/assets/odm_dem/dsm.tif interval=1 format=GeoJSON noise_filter_size=0.0 epsg=4326> finished. Cleaning up temporary files...

Plugin Change Detection (changedetection 1.0.1): Could not execute GRASS script /webodm/plugins/changedetection/changedetection.py from /webodm/app/media/tmp/tmp71_k158a_grass_engine: Starting GRASS GIS... Creating new GRASS GIS location <location>... Cleaning up temporary files... Executing <python /webodm/plugins/changedetection/changedetection.py reference_pc=/webodm/app/media/project/2/task/8d15a99a-63e4-48e4-a564-d3c9de27551b/assets/odm_georeferencing/odm_georeferenced_model.laz compare_pc=/webodm/app/media/project/2/task/8672b8e1-3523-4e01-87a8-1f93561c519e/assets/odm_georeferencing/odm_georeferenced_model.laz reference_dsm=/webodm/app/media/project/2/task/8d15a99a-63e4-48e4-a564-d3c9de27551b/assets/odm_dem/dsm.tif reference_dtm=/webodm/app/media/project/2/task/8d15a99a-63e4-48e4-a564-d3c9de27551b/assets/odm_dem/dtm.tif compare_dsm=/webodm/app/media/project/2/task/8672b8e1-3523-4e01-87a8-1f93561c519e/assets/odm_dem/dsm.tif compare_dtm=/webodm/app/media/project/2/task/8672b8e1-3523-4e01-87a8-1f93561c519e/assets/odm_dem/dtm.tif aligned_dsm=/webodm/app/media/plugins/changedetection/8d15a99a-63e4-48e4-a564-d3c9de27551b_8672b8e1-3523-4e01-87a8-1f93561c519e_dsm.tif aligned_dtm=/webodm/app/media/plugins/changedetection/8d15a99a-63e4-48e4-a564-d3c9de27551b_8672b8e1-3523-4e01-87a8-1f93561c519e_dtm.tif format=GeoJSON epsg=4326 display_type=heatmap resolution=0.2 min_area=40.0 min_height=5.0 can_align_and_rasterize=false> ... Traceback (most recent call last): File "/webodm/plugins/changedetection/changedetection.py", line 111, in <module> from compare import compare File "/webodm/plugins/changedetection/compare.py", line 4, in <module> import cv2 ModuleNotFoundError: No module named 'cv2' Execution of <python /webodm/plugins/changedetection/changedetection.py reference_pc=/webodm/app/media/project/2/task/8d15a99a-63e4-48e4-a564-d3c9de27551b/assets/odm_georeferencing/odm_georeferenced_model.laz compare_pc=/webodm/app/media/project/2/task/8672b8e1-3523-4e01-87a8-1f93561c519e/assets/odm_georeferencing/odm_georeferenced_model.laz reference_dsm=/webodm/app/media/project/2/task/8d15a99a-63e4-48e4-a564-d3c9de27551b/assets/odm_dem/dsm.tif reference_dtm=/webodm/app/media/project/2/task/8d15a99a-63e4-48e4-a564-d3c9de27551b/assets/odm_dem/dtm.tif compare_dsm=/webodm/app/media/project/2/task/8672b8e1-3523-4e01-87a8-1f93561c519e/assets/odm_dem/dsm.tif compare_dtm=/webodm/app/media/project/2/task/8672b8e1-3523-4e01-87a8-1f93561c519e/assets/odm_dem/dtm.tif aligned_dsm=/webodm/app/media/plugins/changedetection/8d15a99a-63e4-48e4-a564-d3c9de27551b_8672b8e1-3523-4e01-87a8-1f93561c519e_dsm.tif aligned_dtm=/webodm/app/media/plugins/changedetection/8d15a99a-63e4-48e4-a564-d3c9de27551b_8672b8e1-3523-4e01-87a8-1f93561c519e_dtm.tif format=GeoJSON epsg=4326 display_type=heatmap resolution=0.2 min_area=40.0 min_height=5.0 can_align_and_rasterize=false> finished. Cleaning up temporary files... Thanks for your help.

pierotofy commented 4 years ago

Hi @taue2512,

It looks like there is some information missing from your issue that will be needed in order to diagnose and fix the problem at hand. Please take a look at the Issue Template, which will tell you exactly what your issue has to contain in order to be processable.

Also, double check that this is the right place. If you are just asking for information, reporting feedback or proposing a few feature, the right place to ask is the Community Forum, not here.

I'm marking this one now as needing some more information. Please understand that if you do not provide that information within the next week (until 2020-10-02 04:20) I'll close this issue so it doesn't clutter the bug tracker.

Cheers! ~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being.

taue2512 commented 4 years ago

I've updated the post using the template accordingly. To me its an issue with the GIT as some required dependencies are not included in a fresh install.

atobiese commented 4 years ago

See issue #903. It occurs because opencv-python==4.1.0.25 fails being installed in the elevationmap and changedetection plugin. I quickly tried updating the opencv version but did not fix it. I'll look at it some more when I get the chance.

taue2512 commented 4 years ago

See issue #903. It occurs because opencv-python==4.1.0.25 fails being installed in the elevationmap and changedetection plugin. I quickly tried updating the opencv version but did not fix it. I'll look at it some more when I get the chance.

Thanks. I was noticing that in python3, the import cv2 command works while in python2 it fails in the docker image.

pierotofy commented 4 years ago

Should be fixed with #927. Please update and re-open if the issue persists? :pray: