Closed marks closed 10 years ago
It sounds like something went wrong when you ran 'python setup.py install'. You have to be in the ckanext-mapviews directory when you do that. And you need to have the virtualenv activated. If you still have trouble, paste this command its output from your terminal.
Here's the output. Thanks for the quick reply and willingness to help!
(default)vagrant@precise32:/usr/lib/ckan/default/src$ cd ckanext-mapviews/
(default)vagrant@precise32:/usr/lib/ckan/default/src/ckanext-mapviews$ python setup.py install
running install
running bdist_egg
running egg_info
writing ckanext_mapviews.egg-info/PKG-INFO
writing namespace_packages to ckanext_mapviews.egg-info/namespace_packages.txt
writing top-level names to ckanext_mapviews.egg-info/top_level.txt
writing dependency_links to ckanext_mapviews.egg-info/dependency_links.txt
writing entry points to ckanext_mapviews.egg-info/entry_points.txt
reading manifest file 'ckanext_mapviews.egg-info/SOURCES.txt'
writing manifest file 'ckanext_mapviews.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
creating build/bdist.linux-i686/egg
creating build/bdist.linux-i686/egg/ckanext
creating build/bdist.linux-i686/egg/ckanext/mapviews
creating build/bdist.linux-i686/egg/ckanext/mapviews/tests
copying build/lib.linux-i686-2.7/ckanext/mapviews/tests/test_view.py -> build/bdist.linux-i686/egg/ckanext/mapviews/tests
copying build/lib.linux-i686-2.7/ckanext/mapviews/tests/__init__.py -> build/bdist.linux-i686/egg/ckanext/mapviews/tests
copying build/lib.linux-i686-2.7/ckanext/mapviews/plugin.py -> build/bdist.linux-i686/egg/ckanext/mapviews
copying build/lib.linux-i686-2.7/ckanext/mapviews/__init__.py -> build/bdist.linux-i686/egg/ckanext/mapviews
copying build/lib.linux-i686-2.7/ckanext/__init__.py -> build/bdist.linux-i686/egg/ckanext
byte-compiling build/bdist.linux-i686/egg/ckanext/mapviews/tests/test_view.py to test_view.pyc
byte-compiling build/bdist.linux-i686/egg/ckanext/mapviews/tests/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-i686/egg/ckanext/mapviews/plugin.py to plugin.pyc
byte-compiling build/bdist.linux-i686/egg/ckanext/mapviews/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-i686/egg/ckanext/__init__.py to __init__.pyc
creating build/bdist.linux-i686/egg/EGG-INFO
copying ckanext_mapviews.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO
copying ckanext_mapviews.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying ckanext_mapviews.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying ckanext_mapviews.egg-info/entry_points.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying ckanext_mapviews.egg-info/namespace_packages.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying ckanext_mapviews.egg-info/not-zip-safe -> build/bdist.linux-i686/egg/EGG-INFO
copying ckanext_mapviews.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO
creating 'dist/ckanext_mapviews-0.1-py2.7.egg' and adding 'build/bdist.linux-i686/egg' to it
removing 'build/bdist.linux-i686/egg' (and everything under it)
Processing ckanext_mapviews-0.1-py2.7.egg
removing '/usr/lib/ckan/default/lib/python2.7/site-packages/ckanext_mapviews-0.1-py2.7.egg' (and everything under it)
creating /usr/lib/ckan/default/lib/python2.7/site-packages/ckanext_mapviews-0.1-py2.7.egg
Extracting ckanext_mapviews-0.1-py2.7.egg to /usr/lib/ckan/default/lib/python2.7/site-packages
Removing ckanext-mapviews 0.1 from easy-install.pth file
Adding ckanext-mapviews 0.1 to easy-install.pth file
Installed /usr/lib/ckan/default/lib/python2.7/site-packages/ckanext_mapviews-0.1-py2.7.egg
Processing dependencies for ckanext-mapviews==0.1
Finished processing dependencies for ckanext-mapviews==0.1
(default)vagrant@precise32:/usr/lib/ckan/default/src/ckanext-mapviews$ nano /etc/ckan/default/development.ini
(default)vagrant@precise32:/usr/lib/ckan/default/src/ckanext-mapviews$ cat /etc/ckan/default/development.ini | grep mapviews
ckan.plugins = stats datastore datapusher viewhelpers linechart barchart piechart simplecsvpreview pages vegaview recline_grid text_preview pdf_preview harvest ckan_harvester mapviews
(default)vagrant@precise32:/usr/lib/ckan/default/src/ckanext-mapviews$ paster serve /etc/ckan/default/development.ini
Traceback (most recent call last):
File "/usr/lib/ckan/default/bin/paster", line 9, in <module>
load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 104, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 143, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 238, in run
result = self.command()
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/serve.py", line 284, in command
relative_to=base, global_conf=vars)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/serve.py", line 321, in loadapp
**kw)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
return loadobj(APP, uri, name=name, **kw)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
return context.create()
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
return self.object_type.invoke(self)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
return fix_call(context.object, context.global_conf, **context.local_conf)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/deploy/util.py", line 56, in fix_call
val = callable(*args, **kw)
File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware.py", line 57, in make_app
load_environment(conf, app_conf)
File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 232, in load_environment
p.load_all(config)
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 134, in load_all
load(*plugins)
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 149, in load
service = _get_service(plugin)
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 256, in _get_service
raise PluginNotFoundException(plugin_name)
ckan.plugins.core.PluginNotFoundException: mapviews
(default)vagrant@precise32:/usr/lib/ckan/default/src/ckanext-mapviews$
The name of the plugs to add to ckan.plugins should be: navigablemap
or choroplethmap
not mapviews
, according to https://github.com/ckan/ckanext-mapviews/blob/master/setup.py . Looks like the readme is wrong.
@davidread - Ah, you're right. Thanks. Do you want to make a PR for the readme or should I or will @vitorbaptista see this and do it?
Also, I get errors about "TemplateNotFound" if I do python setup.py install
but it all works if I do python setup.py develop
everything seems to work :)
@marks If you're able to fix the issue, please do send a pull request.
Bear in mind that even though this extension is working, I'm still working heavily on it, so things might change quite a bit. That being said, it's great to have someone else trying and testing it already. If you find something that doesn't make sense (be it naming, readme, or any bugs), please open issues.
@vitorbaptista - my pleasure. going to keep playing with this and see about adding to it if I come across a gap. Mapping is a major component of the CKAN instance I'm pulling together for a local govt right now.
Slightly off topic but I want to add something (to CKAN) that will geocode data that people upload that doesn't have lat/lon or GeoJSON as part of it but the user or an admin has specified that a certain column might be County, City, etc. Names.
Thanks again!
@marks That sounds interesting. You'll then try to map that column's fields to actual geographical places (i.e. turn Rio de Janeiro
into -22.9156912, -43.449703
) using some API, and plot that in a map?
Cool! Whenever you'd like to share your progress, or ask for some hints, send an email to https://lists.okfn.org/mailman/listinfo/ckan-dev :-)
(Closing this, as it's fixed)
I realize this might not be ready for primetime but the CKAN install I'm working on is running off of the ckan-#1251 branch to take advantage of resource views such as this one. When I follow the instructions to install mapviews and add it to my development.ini file, I get a PluginNotFound error though. Any pointers?
Much appreciated,
Mark