Skip to content
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

No functionality after install #90

Open
derw0lf opened this issue Mar 1, 2022 · 7 comments
Open

No functionality after install #90

derw0lf opened this issue Mar 1, 2022 · 7 comments

Comments

@derw0lf
Copy link

derw0lf commented Mar 1, 2022

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
Copy link
Author

derw0lf commented Mar 4, 2022

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
Copy link

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

@derw0lf
Copy link
Author

derw0lf commented Mar 18, 2022

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
Copy link

categulario commented Mar 18, 2022 via email

@disl-pdavid
Copy link

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
Copy link

euskalhenriko commented Nov 9, 2022

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
Copy link

iperdomo commented Nov 9, 2022

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/[email protected]#egg=ckanext-geoview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants