cmuphillycapstone / ckanext-dictionary

GNU Affero General Public License v3.0
10 stars 15 forks source link

ImportError: 'module' object has no attribute 'DictionaryPlugin' #14

Open ted-strauss-K1 opened 7 years ago

ted-strauss-K1 commented 7 years ago

I installed the extension according to the instructions, onto a recently installed CKAN, v 2.6. I get an Internal Server Error error in the browser, and Apache error log included below. Seems like a path issue... will report back if I'm able to resolve.

[Fri Feb 24 16:46:26.629959 2017] [:error] [pid 26633] [remote 127.0.0.1:45622] mod_wsgi (pid=26633): Target WSGI script '/etc/ckan/default/apache.wsgi' cannot be loaded as Python module.
[Fri Feb 24 16:46:26.630037 2017] [:error] [pid 26633] [remote 127.0.0.1:45622] mod_wsgi (pid=26633): Exception occurred processing WSGI script '/etc/ckan/default/apache.wsgi'.
[Fri Feb 24 16:46:26.630067 2017] [:error] [pid 26633] [remote 127.0.0.1:45622] Traceback (most recent call last):
[Fri Feb 24 16:46:26.630093 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]   File "/etc/ckan/default/apache.wsgi", line 10, in <module>
[Fri Feb 24 16:46:26.630138 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]     application = loadapp('config:%s' % config_filepath)
[Fri Feb 24 16:46:26.630158 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
[Fri Feb 24 16:46:26.630189 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]     return loadobj(APP, uri, name=name, **kw)
[Fri Feb 24 16:46:26.630212 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
[Fri Feb 24 16:46:26.630239 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]     return context.create()
[Fri Feb 24 16:46:26.630257 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
[Fri Feb 24 16:46:26.630283 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]     return self.object_type.invoke(self)
[Fri Feb 24 16:46:26.630308 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
[Fri Feb 24 16:46:26.630338 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]     return fix_call(context.object, context.global_conf, **context.local_conf)
[Fri Feb 24 16:46:26.630356 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/util.py", line 55, in fix_call
[Fri Feb 24 16:46:26.630387 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]     val = callable(*args, **kw)
[Fri Feb 24 16:46:26.630410 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]   File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware/__init__.py", line 45, in make_app
[Fri Feb 24 16:46:26.630443 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]     load_environment(conf, app_conf)
[Fri Feb 24 16:46:26.630468 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]   File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 97, in load_environment
[Fri Feb 24 16:46:26.630496 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]     p.load_all()
[Fri Feb 24 16:46:26.630515 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]   File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 139, in load_all
[Fri Feb 24 16:46:26.630541 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]     load(*plugins)
[Fri Feb 24 16:46:26.630561 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]   File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 153, in load
[Fri Feb 24 16:46:26.630592 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]     service = _get_service(plugin)
[Fri Feb 24 16:46:26.630611 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]   File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 255, in _get_service
[Fri Feb 24 16:46:26.630636 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]     return plugin.load()(name=plugin_name)
[Fri Feb 24 16:46:26.630655 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
[Fri Feb 24 16:46:26.630687 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]     return self.resolve()
[Fri Feb 24 16:46:26.630705 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2365, in resolve
[Fri Feb 24 16:46:26.630753 2017] [:error] [pid 26633] [remote 127.0.0.1:45622]     raise ImportError(str(exc))
[Fri Feb 24 16:46:26.630796 2017] [:error] [pid 26633] [remote 127.0.0.1:45622] ImportError: 'module' object has no attribute 'DictionaryPlugin'
ted-strauss-K1 commented 7 years ago

i never got this extension to work. but i plan to try again.

AnooshaCherukuri commented 7 years ago

I got it working, but i'm not sure a way to test it. Can you let me know if you have any test scenario's for this plugin, Thanks again!!!

smartcolumbus-ide commented 6 years ago

@AnooshaCherukuri How did you overcome this error?

leinue commented 6 years ago

got this error too

and i found the package downloaded from pip has no file 'setup.py'

image

leinue commented 6 years ago

after rename the class name,i got the following error: image

smartcolumbus-ide commented 6 years ago

We were never able to get this to work properly.

josebeas commented 4 years ago

Just got fixed removing datadictionary from plugins, since it is part of ckan 2.8 and newer

debbielee1996 commented 4 years ago

hi @josebeas , I am using ckan 2.8 but Data Dictionary didn't work properly for me. Did you have to do any extra steps to get it running?

josebeas commented 4 years ago

i installed ckan 2.8 using docker compose, removed data dictionary from ckan plugins from production.ini, enabled datapusher and datastore since all task required are automatically triggered from datapusher and datastore, once dataset is stored on datastore you will see datadictionary

josebeas commented 4 years ago

in case you dont see dictionary installed, you can install it using (after activate venv on docker instance) execute: pip install dictionary add dictionary to ckan.plugins on production.ini file save and restart container

josebeas commented 4 years ago

@debbielee1996

jqnatividad commented 4 years ago

@josebeas @debbielee1996 please note that the data dictionary is now a built-in CKAN feature when you install the datastore, and is even accessible thru the Datastore API, and even the Datapusher is data dictionary-aware (i.e. it will not overwrite your data dictionary when updating an existing datastore table).

I would not recommend using this plugin if you're using CKAN 2.7 and newer.

https://docs.ckan.org/en/2.9/maintaining/datastore.html#data-dictionary