[ckan-dev] PluginNotFound for custom plugin.
George Sattler
George.sattler at xvt.com.au
Tue Dec 9 00:12:19 UTC 2014
Okay, got another idea…
You would probably get a ‘PluginNotFound’ error if the path in to the plugin is not correct.
entry_points='''
[ckan.plugins]
# Add plugins here, e.g.
test=ckanext.test.plugin:TestPluginClass
''',
So supposing I had an extension ‘ckanext-test’. The above snippet from setup.py would need to match a path like this:
ckanext-test/ckanext/test/plugin.py
…and the plugin.py file would need to have a class called ‘TestPluginClass’.
Check that is all correct, and make sure that there isn’t a ‘#’ comment in front of the 'test=ckanext…’ line. Try running ‘python setup.py develop’ again after that if you needed to make any changes.
Let me know if that solves it… happy to keep troubleshooting with you.
Cheers
George
On 8 Dec 2014, at 8:45 pm, Henrik Aagaard Jørgensen <BU1G at tmf.kk.dk<mailto:BU1G at tmf.kk.dk>> wrote:
Hi George,
Thank you for your reply.
My extension/plugin is not listed in /usr/lib/ckan/default/lib/python2.7/site-packages/ which I guess is why it cannot be found?
I’ve run python setup.py develop within my python virtualenv and no errors occur and finishes with “Finished processing dependencies for ckanext-mytest==0.1”.
This is on a clean installation of CKAN running datapusher and harvester and nothing else.
Fra: ckan-dev [mailto:ckan-dev-bounces at lists.okfn.org] På vegne af George Sattler
Sendt: 6. december 2014 04:14
Til: CKAN Development Discussions
Emne: Re: [ckan-dev] PluginNotFound for custom plugin.
Hi Henrick
Just a couple of suggestions….
- make sure the python virtualenv is active when you run ‘python setup.py develop’
- Install ‘yolk' and list the python packages that are installed in the virtualenv
To do this:
- Activate the python virtualenv
- Run: 'pip install yolk'
- List the packages: ‘yolk -l’
If the extension is installed, you should see it in this list. If you have further issues, you could try to manually remove the installed extension from /usr/lib/ckan/default/lib/python2.7/site-packages then reinstall again using python setup.py develop.
Hope that helps
George
On 6 Dec 2014, at 1:42 am, Henrik Aagaard Jørgensen <BU1G at tmf.kk.dk<mailto:BU1G at tmf.kk.dk>> wrote:
I’ve got a custom plugin which works fine.
I’ve run “python setup.py develop” as the very last command and my extension (which change the webdesign a bit) shows up fine.
However, when using some of the other extension I get the error “PluginNotFound: my-custom-extension”.
On my local development machine it works, on my production environment it doesn’t.
When I use grep to search for entries in the ckan-library the only difference between my local and production environment is that on my local (where it works) I can see that there’s entries for my custom plugin in local/lib/python2.7/site-packages/easy_install.pth and similar files.
So somehow it seems as if the extension is not “correctly” installed on the production environment.
Should I do anything else than “python setup.py develop” to notify CKAN about my extension (and of course it is added to production.ini, as the custom extension does show the correct changes in the webdesign)?
I’ve tried “python setup.py install” but that made the extension not work.
_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org<mailto:ckan-dev at lists.okfn.org>
https://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
________________________________
This email and any files transmitted with it is confidential and intended solely for the use of the addressee. The unauthorised use, dissemination, forwarding, printing or copying of this communication is strictly prohibited. If you have received this communication in error please notify us immediately by reply email and destroy this communication. Any views and opinions presented in this email are solely those of the author and do not necessarily represent the views of XVT Solutions. The recipient should check this email and any attachments for viruses. XVT Solutions accepts no liability for the content of this email, and any damage caused by any viruses that could potentially be transmitted through this email.
_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org<mailto:ckan-dev at lists.okfn.org>
https://lists.okfn.org/mailman/listinfo/ckan-dev
Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20141209/c39b1cea/attachment-0003.html>
More information about the ckan-dev
mailing list