ckan / ckanext-geoview

CKAN Geospatial ResourceView
MIT License
43 stars 58 forks source link

No functionality after install #90

Open derw0lf opened 2 years ago

derw0lf commented 2 years ago

I was able to install the ckanext-geoview extension but I had to add it manually directly from git because I got a syntax error when starting the one from repository. Now I added the ""geojson_view" plugin in the ckan.ini but nothing happens to my geojson-file. Any Idea?

derw0lf commented 2 years ago

So I tried a fresh install of CKAN on Ubuntu 20.04 directly with the official documentation (http://docs.ckan.org/en/2.9/maintaining/installing/install-from-package.html) Directly after the installation of CKAN (everything up and running) I tried to install the extension "ckanext-geoview" and the following output appears while trying to execute "pip install ckanext-geoview": Traceback (most recent call last): File "/usr/lib/ckan/default/bin/pip", line 5, in <module> from pip._internal.cli.main import main File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 10, in <module> from pip._internal.cli.autocompletion import autocomplete File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module> from pip._internal.cli.main_parser import create_main_parser File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module> from pip._internal.cli import cmdoptions File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/cli/cmdoptions.py", line 25, in <module> from pip._internal.locations import USER_CACHE_DIR, get_src_prefix File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/locations.py", line 19, in <module> from pip._internal.utils import appdirs File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/utils/appdirs.py", line 13, in <module> from pip._vendor import appdirs as _appdirs ImportError: cannot import name 'appdirs' from 'pip._vendor' (/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_vendor/__init__.py)

This seems to be a general problem, isn't it?

categulario commented 2 years ago

Did you try upgrading pip inside the virtualenv? I found that that fixed some issues with other plugins

derw0lf commented 2 years ago

When I try to upgrade pip in virtualenv with python3 -m pip install --upgrade pip

Then the follwoing error message comes up again Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/__main__.py", line 16, in <module> from pip._internal.cli.main import main as _main # isort:skip # noqa File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 10, in <module> from pip._internal.cli.autocompletion import autocomplete File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module> from pip._internal.cli.main_parser import create_main_parser File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module> from pip._internal.cli import cmdoptions File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/cli/cmdoptions.py", line 25, in <module> from pip._internal.locations import USER_CACHE_DIR, get_src_prefix File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/locations.py", line 19, in <module> from pip._internal.utils import appdirs File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/utils/appdirs.py", line 13, in <module> from pip._vendor import appdirs as _appdirs ImportError: cannot import name 'appdirs' from 'pip._vendor' (/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_vendor/__init__.py)

categulario commented 2 years ago

Did you do it with the virtualenv enabled?

El vie., 18 de marzo de 2022 02:04, derw0lf @.***> escribió:

When I try to upgrade pip in virtualenv with python3 -m pip install --upgrade pip

Then the follwoing error message comes up again Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/main.py", line 16, in from pip._internal.cli.main import main as _main # isort:skip # noqa File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 10, in from pip._internal.cli.autocompletion import autocomplete File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py", line 9, in from pip._internal.cli.main_parser import create_main_parser File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/cli/main_parser.py", line 7, in from pip._internal.cli import cmdoptions File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/cli/cmdoptions.py", line 25, in from pip._internal.locations import USER_CACHE_DIR, get_src_prefix File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/locations.py", line 19, in from pip._internal.utils import appdirs File "/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_internal/utils/appdirs.py", line 13, in from pip._vendor import appdirs as _appdirs ImportError: cannot import name 'appdirs' from 'pip._vendor' (/usr/lib/ckan/default/lib/python3.8/site-packages/pip/_vendor/init.py)

— Reply to this email directly, view it on GitHub https://github.com/ckan/ckanext-geoview/issues/90#issuecomment-1072120494, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGBBZGN6L677AB54WYU7OLVAQ2H3ANCNFSM5PUA63OQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

disl-pdavid commented 2 years ago

I am actually seeing this with a clean docker install of CKAN 2.9.5. I follow the installation instructions (https://github.com/ckan/ckanext-geoview#installation) and include resource_proxy geo_view in my ckan plugins. CKAN starts right up without a problem but any kml or geoJSON I upload to a dataset has a blank map view.

A map view is available, it just doesn't do anything.

In my browser console I can see these JS errors:

Uncaught TypeError: this.ckan is undefined
    <anonymous> http://localhost:5000/fanstatic/ckanext-geoview/:version:2022-06-14T21:42:47.08/js/ol_preview.js:13
    <anonymous> http://localhost:5000/fanstatic/ckanext-geoview/:version:2022-06-14T21:42:47.08/js/ol_preview.js:318
euskalhenriko commented 1 year ago

Same here, we have made a clean installation of CKAN 2.9.7 and we have the same error The error in console is:

Uncaught TypeError: Cannot read properties of undefined (reading 'module')
    at bootstrap.js:102399:15
    at bootstrap.js:102704:3

And the referenced js line is:

this.ckan.module('olpreview', function (jQuery, _) {
...
}

It seems that this.ckan is undefined

iperdomo commented 1 year ago

Just to comment for others. The installation instructions in the README are outdated and misleading.

  1. Install the ckanext-geoview Python package into your virtual environment: pip install ckanext-geoview

If you do that, you get the version 0.16.0 released in 2019 - See: https://pypi.org/project/ckanext-geoview/#history

For CKAN 2.9.7, You can get the most recent tag by installing from the git repo:

(venv) $ pip install -e git+https://github.com/ckan/ckanext-geoview@v0.0.20#egg=ckanext-geoview