ckan / ckanext-dcat

CKAN ♥ DCAT
164 stars 142 forks source link

plugins #204

Closed nenad-n closed 2 years ago

nenad-n commented 2 years ago

HI, installed extension (https://github.com/ckan/ckanext-dcat#installation) ckanext-dcat and the ckanext-dcat/requirements.txt, but when I add the required plugins in development.ini file(Enable the required plugins in your ini file: (ckan.plugins = (other plugins) dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface structured_data), ckan is not starting with paster serve comand, when i remove the plugins then I can serve ckan again

seitenbau-govdata commented 2 years ago

I think that nobody can help you at the moment due to a lack of information. So, please provide us with further information and details about your installation steps and the output result.

nenad-n commented 2 years ago

I never worked with ckan and extensions before. I'm trying to get in into this. I only install ckan from source using this guide https://docs.ckan.org/en/2.8/maintaining/installing/install-from-source.html and later i tried to install extension (https://github.com/ckan/ckanext-dcat#installation) ckanext-dcat, nothing else.

seitenbau-govdata commented 2 years ago

Do you get the CKAN start page if you request the http://127.0.0.1:5000/ with the web browser, without the additional plugins from ckanext-dcat? Do you have installed the required CKAN extension ckanext-harvest? This is the first point in the installation instruction for ckanext-dcat. The extension is needed for the harvester, e.g. for the plugins dcat_rdf_harvester and dcat_json_harvester.

nenad-n commented 2 years ago

Yes i'm getting the ckan start page without the additional plugins. I also installed harvest and the same problem persist. when i try to serve ckan with the plugins. This is what i get as output: sudo paster serve /etc/ckan/default/development.ini 2021-12-23 10:49:56,243 INFO [ckan.config.environment] Loading static files from public 2021-12-23 10:49:56,277 INFO [ckan.config.environment] Loading templates from /home/admin-db/ckan/lib/default/src/ckan/ckan/templates Traceback (most recent call last): File "/usr/local/bin/paster", line 11, in sys.exit(run()) File "/usr/local/lib/python2.7/dist-packages/paste/script/command.py", line 102, in run invoke(command, command_name, options, args[1:]) File "/usr/local/lib/python2.7/dist-packages/paste/script/command.py", line 141, in invoke exit_code = runner.run(args) File "/usr/local/lib/python2.7/dist-packages/paste/script/command.py", line 236, in run result = self.command() File "/usr/local/lib/python2.7/dist-packages/paste/script/serve.py", line 284, in command relative_to=base, global_conf=vars) File "/usr/local/lib/python2.7/dist-packages/paste/script/serve.py", line 329, in loadapp kw) File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp return loadobj(APP, uri, name=name, kw) File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 272, in loadobj return context.create() File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create return self.object_type.invoke(self) File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 146, in invoke return fix_call(context.object, context.global_conf, *context.local_conf) File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 55, in fix_call val = callable(args, *kw) File "/home/admin-db/ckan/lib/default/src/ckan/ckan/config/middleware/init.py", line 55, in make_app load_environment(conf, app_conf) File "/home/admin-db/ckan/lib/default/src/ckan/ckan/config/environment.py", line 116, in load_environment p.load_all() File "/home/admin-db/ckan/lib/default/src/ckan/ckan/plugins/core.py", line 140, in load_all load(plugins) File "/home/admin-db/ckan/lib/default/src/ckan/ckan/plugins/core.py", line 154, in load service = _get_service(plugin) File "/home/admin-db/ckan/lib/default/src/ckan/ckan/plugins/core.py", line 256, in _get_service return plugin.load()(name=plugin_name) File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2229, in load return self.resolve() File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2235, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/home/admin-db/src/ckanext-dcat/ckanext/dcat/plugins/init.py", line 3, in from builtins import object ImportError: No module named builtins

seitenbau-govdata commented 2 years ago

The error indicates that the required package future isn't installed in your python environment.

Please try to install all python requirements defined in requirements.txt as described in the third bullet point following the installation guide. (pyenv) $ pip install -r ckanext-dcat/requirements.txt

nenad-n commented 2 years ago

Requirement already satisfied: ckantoolkit==0.0.3 in /home/admin-db/ckan/lib/default/lib/python2.7/site-packages (from -r pip-requirements.txt (line 1)) (0.0.3) Requirement already satisfied: pika>=1.1.0 in /home/admin-db/ckan/lib/default/lib/python2.7/site-packages (from -r pip-requirements.txt (line 2)) (1.2.0) Requirement already satisfied: pyOpenSSL==18.0.0 in /home/admin-db/ckan/lib/default/lib/python2.7/site-packages (from -r pip-requirements.txt (line 3)) (18.0.0) Requirement already satisfied: redis in /home/admin-db/ckan/lib/default/lib/python2.7/site-packages (from -r pip-requirements.txt (line 4)) (3.5.3) Requirement already satisfied: requests>=2.11.1 in /home/admin-db/ckan/lib/default/lib/python2.7/site-packages (from -r pip-requirements.txt (line 5)) (2.26.0) Requirement already satisfied: six>=1.12.0 in /home/admin-db/ckan/lib/default/lib/python2.7/site-packages (from -r pip-requirements.txt (line 6)) (1.16.0) Requirement already satisfied: cryptography>=2.2.1 in /home/admin-db/ckan/lib/default/lib/python2.7/site-packages (from pyOpenSSL==18.0.0->-r pip-requirements.txt (line 3)) (3.3.2) Requirement already satisfied: certifi>=2017.4.17 in /home/admin-db/ckan/lib/default/lib/python2.7/site-packages (from requests>=2.11.1->-r pip-requirements.txt (line 5)) (2021.10.8) Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/admin-db/ckan/lib/default/lib/python2.7/site-packages (from requests>=2.11.1->-r pip-requirements.txt (line 5)) (1.26.7) Requirement already satisfied: idna<3,>=2.5; python_version < "3" in /home/admin-db/ckan/lib/default/lib/python2.7/site-packages (from requests>=2.11.1->-r pip-requirements.txt (line 5)) (2.10) Requirement already satisfied: chardet<5,>=3.0.2; python_version < "3" in /home/admin-db/ckan/lib/default/lib/python2.7/site-packages (from requests>=2.11.1->-r pip-requirements.txt (line 5)) (4.0.0) Requirement already satisfied: enum34; python_version < "3" in /home/admin-db/ckan/lib/default/lib/python2.7/site-packages (from cryptography>=2.2.1->pyOpenSSL==18.0.0->-r pip-requirements.txt (line 3)) (1.1.10) Requirement already satisfied: ipaddress; python_version < "3" in /home/admin-db/ckan/lib/default/lib/python2.7/site-packages (from cryptography>=2.2.1->pyOpenSSL==18.0.0->-r pip-requirements.txt (line 3)) (1.0.23) Requirement already satisfied: cffi>=1.12 in /home/admin-db/ckan/lib/default/lib/python2.7/site-packages (from cryptography>=2.2.1->pyOpenSSL==18.0.0->-r pip-requirements.txt (line 3)) (1.15.0) Requirement already satisfied: pycparser in /home/admin-db/ckan/lib/default/lib/python2.7/site-packages (from cffi>=1.12->cryptography>=2.2.1->pyOpenSSL==18.0.0->-r pip-requirements.txt (line 3)) (2.21)

seitenbau-govdata commented 2 years ago

The file pip-requirements.txt are the requirements for the extension ckanext-harvest and not for ckanext-dcat, because in ckanext-dcat there exists no such file. Netherless the ckanext-harvest requirements are required too.

Please try to install the ckanext-dcat requirements defined in https://github.com/ckan/ckanext-dcat/blob/master/requirements.txt.

nenad-n commented 2 years ago

Thanks a lot for your assistance. I tried to install ckanext-dcat requirements defined in https://github.com/ckan/ckanext-dcat/blob/master/requirements.txt. But i am getting output that they are already satisfied. Here is an expample: (default) root@sobdb2:/home/admin-db/src/ckanext-dcat# pip install six DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Requirement already satisfied: six in /home/admin-db/ckan/lib/default/lib/python2.7/site-packages (1.16.0

seitenbau-govdata commented 2 years ago

Are you sure that you have installed all CKAN python packages with their requirements in the same python environment? Please copy and paste the python packages installed in your python environment: pip list

nenad-n commented 2 years ago

Thanks a lot for your assistance. I tried to install ckanext-dcat requirements defined in https://github.com/ckan/ckanext-dcat/blob/master/requirements.txt. But i am getting output that they are already satisfied. Here is an expample: (default) root@sobdb2:/home/admin-db/src/ckanext-dcat# pip install six DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Requirement already satisfied: six in /home/admin-db/ckan/lib/default/lib/python2.7/site-packages (1.16.0

nenad-n commented 2 years ago

(default) root@sobdb2:/home/admin-db/src/ckanext-dcat# pip list DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Package Version Location


alabaster 0.7.12 Babel 2.9.1 backports.functools-lru-cache 1.6.4 Beaker 1.11.0 beautifulsoup4 4.5.1 blinker 1.4 certifi 2021.10.8 cffi 1.15.0 chardet 4.0.0 ckan 2.8.9 /home/admin-db/ckan/lib/default/src/ckan ckanext-datarequests 1.1.0 ckanext-dcat 1.1.3 /home/admin-db/ckan/lib/default/lib/python2.7/site-packages/ckanext_dcat-1.1.3-py2.7.egg ckanext-dcat-usmetadata 0.3.0 ckanext-harvest 1.3.3 /home/admin-db/ckan/lib/default/lib/python2.7/site-packages/ckanext_harvest-1.3.3-py2.7.egg ckanext-showcase 1.0.3 ckantoolkit 0.0.3 click 7.1.2 configparser 4.0.2 contextlib2 0.6.0.post1 coverage 5.5 coveralls 1.11.1 cryptography 3.3.2 decorator 4.4.2 docopt 0.6.2 docutils 0.12 enum34 1.1.10 extras 1.0.0 factory-boy 2.1.1 first 2.0.2 fixtures 3.0.0 Flask 1.1.4 Flask-Babel 2.0.0 Flask-DebugToolbar 0.10.1 Flask-SQLAlchemy 2.5.1 FormEncode 2.0.1 funcsigs 1.0.2 future 0.18.2 geomet 0.3.0 html5lib 1.1 httpretty 0.8.3 idna 2.10 imagesize 1.3.0 importlib-metadata 2.1.2 ipaddress 1.0.23 isodate 0.6.1 itsdangerous 1.1.0 Jinja2 2.11.3 linecache2 1.0.0 Mako 1.1.6 MarkupSafe 1.1.1 mock 2.0.0 mox3 0.28.0 nose 1.3.7 packaging 20.9 Paste 3.5.0 PasteDeploy 2.1.1 PasteScript 3.2.1 pathlib2 2.3.6 pbr 5.8.0 pika 1.2.0 pip 20.3.4 pip-tools 1.7.0 pkg-resources 0.0.0 polib 1.1.1 pycodestyle 2.2.0 pycparser 2.21 pyfakefs 2.9 Pygments 2.5.2 Pylons 1.0.3 pyOpenSSL 18.0.0 pyparsing 2.4.7 python-mimeparse 1.6.0 pytz 2021.3 pyutilib.component.core 4.6.4 rdflib 4.2.1 rdflib-jsonld 0.4.0 redis 3.5.3 repoze.lru 0.7 requests 2.26.0 Routes 2.5.1 scandir 1.10.0 setuptools 36.1.0 simplejson 3.17.6 six 1.16.0 snowballstemmer 2.2.0 soupsieve 1.9.6 SPARQLWrapper 1.8.5 Sphinx 1.7.1 sphinx-rtd-theme 0.3.1 sphinxcontrib-websupport 1.1.2 SQLAlchemy 1.4.27 Tempita 0.5.2 testtools 2.4.0 traceback2 1.4.0 typing 3.10.0.0 unittest2 1.1.0 urllib3 1.26.7 waitress 1.4.4 webencodings 0.5.1 WebError 0.13.1 WebHelpers 1.3 WebOb 1.8.7 WebTest 2.0.35 Werkzeug 1.0.1 wheel 0.37.0 zipp 1.2.0

seitenbau-govdata commented 2 years ago

This python environment looks good to me. What are the path to the command pip you have called pip list? I assume /home/admin-db/ckan/bin. Am I right?

I think you have to call the paster command from the same python environment binary folder, e.g. sudo /home/admin-db/ckan/bin/paster serve /etc/ckan/default/development.ini.

nenad-n commented 2 years ago

When i call the command from bin directory i get this error : "pkg_resources.DistributionNotFound: The 'ckan' distribution was not found and is required by the application"

And when i cal the paster commnad from the folder where the ckan is installed i still get the same error : ImportError: No module named builtins.. when i add the plugins in the ini file.

seitenbau-govdata commented 2 years ago

Hi @Nenad-N,

were you able to solve the problem in the meantime?

nenad-n commented 2 years ago

Hi @Nenad-N,

were you able to solve the problem in the meantime?

I installed everything on the latest versions on ckan, you can use this articles: http://docs.ckan.org/en/2.9/maintaining/installing/install-from-package.html http://docs.ckan.org/en/2.9/maintaining/cli.html http://docs.ckan.org/en/2.9/maintaining/linked-data-and-rdf.html?highlight=dcat#linked-data-and-rdf

Hope you find this helpful. I can't help you further because in mean time i changed my job and i don't know what is happening now....

seitenbau-govdata commented 2 years ago

I just wanted to know if the problem is solved. 😃 Then I will close the issue now.