[ckan-dev] Problem with new extension installation

Thodoris Papadopoulos thodoris at thodoris.net
Fri Dec 21 14:23:58 UTC 2012


We have tried another approach :

1. We created the extension from scratch using first :


(pyenv)$ paster create -t ckanext ckanext-datagovgr


2. we updated the extension files (setup.py , plugin.py , css & html ) ,
setting
    a. @setup.py |  entry point as :
datagovgr_customizations=ckanext.datagovgr:DATAGOVGRCustomizations
    b. @plugin.py | class name as : class
DATAGOVGRCustomizations(plugins.SingletonPlugin):

3. Installed the extension in the virtual environment
(pyenv)$ cd ckanext-datagovgr
(pyenv)$ python setup.py develop
(pyenv)$ python


>>> import ckanext.datagovgr

4. Updated development.ini plugins section

    ckan.plugins = stats  datagovgr_customizations


Now , when we start CKAN we take a different error :

File
"/home/ckan/pyenv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py",
line 1994, in load
    raise ImportError("%r has no %r attribute" % (entry,attr))
ImportError: <module 'ckanext.datagovgr' from
'/home/ckan/pyenv/src/ckanext-datagovgr/ckanext/datagovgr/__init__.pyc'>
has no 'DATAGOVGRCustomizations' attribute


Thodoris Papadopoulos




On Fri, Dec 21, 2012 at 1:34 PM, Thodoris Papadopoulos <
thodoris at thodoris.net> wrote:

> Hello,
>
> Here is the setup.py  http://pastebin.com/b26gxUX7
>
> The entry point is : gr_customizations=ckanext.gr.plugin:GRCustomizations
>   and i checked that my class name is GRCustomizations
>
>
> Thank you
>
>
> On Fri, Dec 21, 2012 at 1:03 PM, Thodoris Papadopoulos <
> thodoris at thodoris.net> wrote:
>
>> Hello,
>>
>> We face a problem with a CKAN extension we are developing for data.gov.gr
>> .
>> The purpose of the extension is mainly to customize the UI , and its
>> based on examples we have found on github.
>> For the moment we develop the extension locally (not yet on github).
>>
>> We copied all the extension directory  structure under
>> ~/pyenv/src/ckanext-gr
>> and then we installed the extension using :
>>
>>
>> (pyenv)$ cd ~/pyenv/src/ckanext-gr
>> (pyenv)$ sudo python setup.py develop
>> (pyenv)$ python
>> Python 2.6.6 (r266:84292, Oct  6 2010, 16:19:55)
>> [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> import ckanext.gr
>>
>> All the above run , without problem.
>> FInally , we added the extension  into the plugins section of
>> development.ini.
>> ckan.plugins = stats gr_customizations
>>
>> The problem is that when we start CKAN we get the following error:
>>
>> File "/home/ckan/pyenv/src/ckan/ckan/plugins/core.py", line 166, in
>> find_user_plugins
>>     raise PluginNotFoundException(name)
>> ckan.plugins.core.PluginNotFoundException: gr_customizations
>>
>>
>> Any ideas ?
>>
>> Thank you
>> Thodoris Papadopoulos
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20121221/ee8876bf/attachment-0001.html>


More information about the ckan-dev mailing list