[ckan-dev] Help with understanding plugin not found

Timothy Giles timothy.giles at slu.se
Sun Jan 22 19:23:32 UTC 2017


Carl,

I had written a reply Friday but then found the problem but did not have time to edit this.

So, the problem I had, and should likely be added to the CKAN documentation, was that the  easy-install.pth file was not being updated with the path to the extension. As soon as I added in the path to the new extension (or any other extension I tried adding) - everything worked a treat.

I am still stuck on why this has suddenly happened on 2 seperate development VMs. I suspect that in the last 2 years working on CKAN development, it explains a lot and had I known, would have saved quite a few wipes and reloads of our development VMs.

If anyone else had had issues with this and knows of a permanent way to fix (or stop it from happening) this - that would be good to hear. But for now, manually updating the file is a small price to pay for continued development.


Regards Timothy


​
From: ckan-dev [mailto:ckan-dev-bounces at lists.okfn.org] On Behalf Of Carl Lange
Sent: den 20 januari 2017 00:21
To: CKAN Development Discussions <ckan-dev at lists.okfn.org>
Subject: Re: [ckan-dev] Help with understanding plugin not found

Hi Tim,

And when do you see the error?

I see this issue most frequently with a virtualenv mistake - either I didn't enable it when I installed, or I didn't enable it for whatever paster script I was running, or something like that.

Next most often is with different users - if a plugin is installed as a user that is different to the user that runs CKAN (most often www-data), there can sometimes be a permissions error (although this is definitely less frequent). You might see this especially if you set up your servers using puppet or some similar tool, because they can get kind of weird about which user they're installing as or for. Perhaps double-check users and permissions.

Finally, it might be worth running a `find / -type d -name ckanext-myplugin` and `find / -type d -name ckanext-pluginthatworks` and see if the one that works shows up in a place which the one that doesn't doesn't.

I hope this helps!

Cheers,
Carl


On Thu, 19 Jan 2017 at 22:08 Timothy Giles <timothy.giles at slu.se<mailto:timothy.giles at slu.se>> wrote:
Hi Carl.

Definitely activated. Python setup.py develop.

Regards Tim
________________________________________
From: ckan-dev [ckan-dev-bounces at lists.okfn.org<mailto:ckan-dev-bounces at lists.okfn.org>] on behalf of Carl Lange [carl at derilinx.com<mailto:carl at derilinx.com>]
Sent: 19 January 2017 08:41 PM
To: CKAN Development Discussions
Subject: Re: [ckan-dev] Help with understanding plugin not found

Hi Timothy,

How do you normally 'install' an extension? You have the code locally and run `python setup.py install`? Or `python setup.py develop`? Or...?
Also, are you sure you have the CKAN virtualenv enabled when installing plugins, by doing `. /usr/lib/ckan/default/bin/activate.sh` or similar?

Cheers,
Carl


On Thu, 19 Jan 2017 at 18:05 Timothy Giles <timothy.giles at slu.se<mailto:timothy.giles at slu.se><mailto:timothy.giles at slu.se<mailto:timothy.giles at slu.se>>> wrote:

Hi all,


So two of my teams development environments have recently suffered from being unable to use newly created extensions. So, our base build of CKAN includes 20 odd extensions and works well in both development, test and production. The two development VMs in question both complain when a new extension is either created (ie. using the paster create template command) or I copy paste an existing extension and copy replace in setup.py and plugin.py.


So, the issue is definitely not a lack of understanding and implementation of getting the plugin name correct, consistent etc... Even a newly created extension is giving the same error. Even if disable all extensions bar the new one - it still complains. And - today - we installed a 3rd part extension (I forget which one) - so it does not seem to be just my groups extensions. And to reiterate, the mix of home grown and community plugins already in and working (around 20) work a treat.


Is there anything else I can check on these VMs. I dont really have the time to completely reload them - and I am sure someone with a bit more experience of CKAN development can help point me at a file or directory or config file somewhere that might help provide some answers.



Thanks in advance


Tim

_______________________________________________
ckan-dev mailing list
ckan-dev at lists.okfn.org<mailto:ckan-dev at lists.okfn.org><mailto: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
--
Cheers,
Carl
_______________________________________________
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
--
Cheers,
Carl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20170122/019dbef3/attachment-0003.html>


More information about the ckan-dev mailing list