Enabling new short links plugin

Hi, just trying to enable this new plugin: Short links plugin by pierotofy · Pull Request #1009 · OpenDroneMap/WebODM · GitHub

I’ve updated and the files are definitely there in the coreplugins/shortlinks directory

I’ve restarted the app several times, but it still doesn’t appear in the admin interface, is there something else I need to do?

1 Like

After enabling it and restarting WebODM, a new checkbox will be available under the “Share” button popup from the Map/3D View display page.

1 Like

Did you re-build your docker images also?

1 Like

Hi Piero, yes it’s definitely in the rebuilt images as I can see it from a bash shell.
The problem is I can’t get it to appear in the admin plugin list in order to enable it, I tried a ctrl+f5 refresh, multiple restarts, etc.

$ kubectl exec --stdin --tty webapp-worker -c webapp -- /bin/bash
root@webapp-worker:/webodm# ls coreplugins/shortlinks/ -l
total 12
-rw-r--r--. 1 root root 2220 Jul 15 05:53 api.py
-rw-r--r--. 1 root root    0 Jul 15 05:53 disabled
-rw-r--r--. 1 root root  382 Jul 15 05:53 manifest.json
-rw-r--r--. 1 root root  700 Jul 15 05:53 plugin.py
drwxr-xr-x. 1 root root   66 Jul 14 12:22 public
root@webapp-worker:/webodm# exit
1 Like

Mm, strange. How does the webapp container output log look like?

1 Like

Here it is:

e[92m
 _       __     __    ____  ____  __  ___
| |     / /__  / /_  / __ \/ __ \/  |/  /
| | /| / / _ \/ __ \/ / / / / / / /|_/ / 
| |/ |/ /  __/ /_/ / /_/ / /_/ / /  / /  
|__/|__/\___/_.___/\____/_____/_/  /_/   

e[39m
Checking python version... 3.x, good!
Checking GDAL version... GDAL 3.2.1, released 2020/12/29, excellent!
Running migrations
Generated secret key
Operations to perform:
  Apply all migrations: admin, app, auth, contenttypes, guardian, nodeodm, sessions, social_django
Running migrations:
  No migrations to apply.
Checking for celery...  e[92me[1m OKe[0me[39m
Scheduler is not running.
Generating nginx configurations from templates...
- nginx/nginx-ssl.conf
- nginx/nginx.conf
Using nginx SSL configuration
nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /webodm/nginx/nginx-ssl.conf:43
celery beat v4.4.0 (cliffs) is starting.
[2021-07-16 02:11:30 +0000] [1855] [INFO] Starting gunicorn 19.7.1
[2021-07-16 02:11:30 +0000] [1855] [INFO] Listening at: unix:/tmp/gunicorn.sock (1855)
[2021-07-16 02:11:30 +0000] [1855] [INFO] Using worker: sync
/usr/lib/python3.8/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  return io.open(fd, *args, **kwargs)
[2021-07-16 02:11:30 +0000] [1878] [INFO] Booting worker with pid: 1878
[2021-07-16 02:11:30 +0000] [1879] [INFO] Booting worker with pid: 1879
INFO Booting WebODM 1.9.3
[2021-07-16 02:11:30 +0000] [1880] [INFO] Booting worker with pid: 1880
INFO Registered [coreplugins.cesiumion.plugin]
__    -    ... __   -        _
LocalTime -> 2021-07-16 02:11:30
Configuration ->
    . broker -> redis://broker:6379//
    . loader -> celery.loaders.app.AppLoader
    . scheduler -> celery.beat.PersistentScheduler
    . db -> celerybeat-schedule
    . logfile -> [stderr]@%WARNING
    . maxinterval -> 5.00 minutes (300s)
[2021-07-16 02:11:30 +0000] [1882] [INFO] Booting worker with pid: 1882
[2021-07-16 02:11:30 +0000] [1883] [INFO] Booting worker with pid: 1883
[2021-07-16 02:11:30 +0000] [1884] [INFO] Booting worker with pid: 1884
[2021-07-16 02:11:30 +0000] [1885] [INFO] Booting worker with pid: 1885
[2021-07-16 02:11:30 +0000] [1886] [INFO] Booting worker with pid: 1886
[2021-07-16 02:11:30 +0000] [1887] [INFO] Booting worker with pid: 1887
[2021-07-16 02:11:30 +0000] [1888] [INFO] Booting worker with pid: 1888
[2021-07-16 02:11:30 +0000] [1889] [INFO] Booting worker with pid: 1889
[2021-07-16 02:11:30 +0000] [1890] [INFO] Booting worker with pid: 1890
[2021-07-16 02:11:30 +0000] [1891] [INFO] Booting worker with pid: 1891
[2021-07-16 02:11:30 +0000] [1892] [INFO] Booting worker with pid: 1892
[2021-07-16 02:11:30 +0000] [1893] [INFO] Booting worker with pid: 1893
[2021-07-16 02:11:30 +0000] [1894] [INFO] Booting worker with pid: 1894
[2021-07-16 02:11:30 +0000] [1895] [INFO] Booting worker with pid: 1895
[2021-07-16 02:11:30 +0000] [1896] [INFO] Booting worker with pid: 1896
[2021-07-16 02:11:30 +0000] [1897] [INFO] Booting worker with pid: 1897
[2021-07-16 02:11:30 +0000] [1898] [INFO] Booting worker with pid: 1898
[2021-07-16 02:11:31 +0000] [1899] [INFO] Booting worker with pid: 1899
[2021-07-16 02:11:31 +0000] [1900] [INFO] Booting worker with pid: 1900
[2021-07-16 02:11:31 +0000] [1901] [INFO] Booting worker with pid: 1901
[2021-07-16 02:11:31 +0000] [1902] [INFO] Booting worker with pid: 1902
[2021-07-16 02:11:31 +0000] [1903] [INFO] Booting worker with pid: 1903
[2021-07-16 02:11:31 +0000] [1904] [INFO] Booting worker with pid: 1904
[2021-07-16 02:11:31 +0000] [1905] [INFO] Booting worker with pid: 1905
[2021-07-16 02:11:31 +0000] [1906] [INFO] Booting worker with pid: 1906
[2021-07-16 02:11:31 +0000] [1910] [INFO] Booting worker with pid: 1910
INFO Installing requirements.txt for [coreplugins.changedetection.plugin]
[2021-07-16 02:11:31 +0000] [1912] [INFO] Booting worker with pid: 1912
[2021-07-16 02:11:31 +0000] [1913] [INFO] Booting worker with pid: 1913
[2021-07-16 02:11:31 +0000] [1914] [INFO] Booting worker with pid: 1914
[2021-07-16 02:11:31 +0000] [1915] [INFO] Booting worker with pid: 1915
[2021-07-16 02:11:31 +0000] [1916] [INFO] Booting worker with pid: 1916
[2021-07-16 02:11:31 +0000] [1917] [INFO] Booting worker with pid: 1917
[2021-07-16 02:11:31 +0000] [1918] [INFO] Booting worker with pid: 1918
[2021-07-16 02:11:31 +0000] [1919] [INFO] Booting worker with pid: 1919
[2021-07-16 02:11:31 +0000] [1920] [INFO] Booting worker with pid: 1920
[2021-07-16 02:11:32 +0000] [1921] [INFO] Booting worker with pid: 1921
[2021-07-16 02:11:32 +0000] [1922] [INFO] Booting worker with pid: 1922
[2021-07-16 02:11:32 +0000] [1923] [INFO] Booting worker with pid: 1923
[2021-07-16 02:11:32 +0000] [1924] [INFO] Booting worker with pid: 1924
[2021-07-16 02:11:32 +0000] [1925] [INFO] Booting worker with pid: 1925
[2021-07-16 02:11:32 +0000] [1926] [INFO] Booting worker with pid: 1926
[2021-07-16 02:11:32 +0000] [1927] [INFO] Booting worker with pid: 1927
Collecting geojson==2.4.1
  Downloading geojson-2.4.1-py2.py3-none-any.whl (15 kB)
Collecting opencv-python==4.4.0.44
  Downloading opencv_python-4.4.0.44-cp38-cp38-manylinux2014_x86_64.whl (49.5 MB)

Trying to establish communication...
e[93m
Something doesn't look right! ¯\_(ツ)_/¯
The server returned a status code of 000 when we tried to reach it.
==========================
e[39m
Check if WebODM is running, maybe we tried to reach it too soon.
e[93m
Open a web browser and navigate to https://asdc.erc.monash.edu:443
e[39m
e[91mNOTE:e[39m Windows users using docker should replace localhost with the IP of their docker machine's IP. To find what that is, run: docker-machine ip
Collecting scipy==1.7.0
  Downloading scipy-1.7.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (28.4 MB)
Collecting numpy>=1.17.3
  Downloading numpy-1.21.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.7 MB)
ERROR: rasterio 1.1.5 has requirement click<8,>=4.0, but you'll have click 8.0.1 which is incompatible.
Installing collected packages: geojson, numpy, opencv-python, scipy
Successfully installed geojson-2.4.1 numpy-1.21.0 opencv-python-4.4.0.44 scipy-1.7.0
INFO Installed requirements.txt for [coreplugins.changedetection.plugin]
INFO Registered [coreplugins.changedetection.plugin]
INFO Registered [coreplugins.cloudimport.plugin]
INFO Registered [coreplugins.contours.plugin]
INFO Registered [coreplugins.diagnostic.plugin]
INFO Registered [coreplugins.elevationmap.plugin]
INFO Registered [coreplugins.fullscreen.plugin]
INFO Registered [coreplugins.lightning.plugin]
INFO Registered [coreplugins.measure.plugin]
INFO Registered [coreplugins.openaerialmap.plugin]
INFO Registered [coreplugins.posm-gcpi.plugin]
1 Like

Based on the log, the plugin is not being found/loaded, for some reason.

From the container, try to run:

root@da89fa36cf56:/webodm# echo "from app.plugins.functions import get_plugins; print(get_plugins())" | python manage.py shell
[<coreplugins.cesiumion.plugin.Plugin object at 0x7fb23ae548d0>, <coreplugins.changedetection.plugin.Plugin object at 0x7fb23ae54908>, <coreplugins.cloudimport.plugin.Plugin object at 0x7fb23ae549b0>, <coreplugins.contours.plugin.Plugin object at 0x7fb23ab35208>, <coreplugins.diagnostic.plugin.Plugin object at 0x7fb23ae54978>, <coreplugins.elevationmap.plugin.Plugin object at 0x7fb23aac8f98>, <coreplugins.fullscreen.plugin.Plugin object at 0x7fb23aad2908>, <coreplugins.lightning.plugin.Plugin object at 0x7fb23aad2e48>, <coreplugins.measure.plugin.Plugin object at 0x7fb23aad9940>, <coreplugins.openaerialmap.plugin.Plugin object at 0x7fb23aaed860>, <coreplugins.osm-quickedit.plugin.Plugin object at 0x7fb23ab35d30>, <coreplugins.posm-gcpi.plugin.Plugin object at 0x7fb23aa8e6a0>, <coreplugins.shortlinks.plugin.Plugin object at 0x7fb23aa96898>]
root@da89fa36cf56:/webodm# 

Does the shortlinks plugin show up?

1 Like

That was enough to work it out, it was missing the __init__.py, thanks!

Entirely my fault, I had a bit of a merge from hell with the change of the plugins dir to coreplugins because that is where I’ve been modifying WebODM the most and somehow (no idea how) git lost __init__.py in the merge.

Thanks again for the help, sorry for wasting your time!

2 Likes

Happy to help! Glad you figured it out.

2 Likes