[ckan-dev] Plugin not found when deployed to a production server
Vitor Baptista
vitor at vitorbaptista.com
Sun Jun 8 02:39:03 UTC 2014
Hi Qifeng,
Did you have the virtualenv activated when you installed your extension on
production? It seems you've done everything correctly, so the only
explanation I can think of is that the extension wasn't installed on the
same environment as CKAN on production.
Cheers,
2014-06-05 23:04 GMT-03:00 <Qifeng.Bai at csiro.au>:
> Hi, there
>
> I have created a plugin and tested on my development server, All is OK
>
>
>
> The plugin sits in:
>
> /home/ckan/lib/default/src/nlmpext:
>
> ->ckanext
>
>
> ->__init__.py
>
> -> nlmp
> #this directory contain all my files
>
> ->setup.py
>
>
>
> In setup.py, I defined two extensions
>
> experiment_nlmp=ckanext.nlmp.plugin:NlmpExperimentPlugin
>
> project_nlmp=ckanext.nlmp.plugin:NlmpProjectFormPlugin
>
>
>
> I followed the guides, run python setup.py develop
>
>
>
> And then add these two plugins into /home/ckan/set/default/development.ini
>
> ckan.plugins = stats text_preview recline_preview project_nlmp
> experiment_nlmp
>
>
>
> ALL GOOD
>
>
>
> I have already created CKAN on window azure from VM_DEPOT, the production
> server also works well
>
>
>
> I have uploaded my extension to /usr/lib/ckan/default/src/ckan/ckanext
>
>
>
> So the directory is /usr/lib/ckan/default/src/ckan/ckanext/nlmp
>
>
> ->setup.py
>
>
> ->ckanext
>
>
> ->setup.py
>
>
> ->ckanext
>
>
> ->__init__.py
>
>
> ->
> nlmp #this directory contain all my files
>
> Then I ran: python setup.py develop
>
> See the log, seems all good: ckanext-nlmp 0.3 is already the active
> version in easy-install.pth
>
>
>
> Also I added these two extions into production.ini. However, it gave me an
> error:
>
> PluginNotFoundException: project_nlmp
>
>
>
> I am aware of there is a __init__.py under
> /usr/lib/ckan/default/src/ckan/ckanext/
>
> Although I don’t have this file under nlmp folder, I wonder it still mess
> up my namespace
>
>
>
> Any advice is appreciated
>
>
>
> Qifeng
>
>
>
>
>
>
>
>
>
> [image: cid:image001.gif at 01CC55BF.85E7FEB0]
>
> Qifeng Bai
> Software Engineer
> CSIRO Land and Water
> Black Mountain, Canberra
>
> Ph: +61-2-62465704
> Web: www.clw.csiro.au
>
>
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
--
Vítor Baptista
Developer | http://vitorbaptista.com | LinkedIn
<http://www.linkedin.com/in/vitorbaptista> | @vitorbaptista
<http://twitter.com/vitorbaptista>
The Open Knowledge Foundation <http://okfn.org>
*Empowering through Open Knowledge*
http://okfn.org/ | @okfn <http://twitter.com/okfn> | OKF on Facebook
<https://www.facebook.com/OKFNetwork> | Blog <http://blog.okfn.org/> |
Newsletter <http://okfn.org/about/newsletter/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140607/423f1775/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 2094 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140607/423f1775/attachment-0003.gif>
More information about the ckan-dev
mailing list