-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugins cannot be loaded with Pelican 4.5.0 #181
Comments
Yeah, I got the same. |
I'm running Pelican 4.5.0 and am still experiencing load_legacy() not found issue. $ python3.8 -c "import pelican;print(pelican.__version__)"
4.5.0 At 7a6686f4 (origin/master, origin/HEAD) Fix SUMMARY_END_SUFFIX variable name in changelog I've done a
I used the following plugin settings:
And my console output for Pelican was: ERROR: Cannot load plugin `m.alias`
| No module named 'm'
ERROR: Cannot load plugin `m.htmlsanity`
| No module named 'm'
ERROR: Cannot load plugin `m.images`
| No module named 'm'
ERROR: Cannot load plugin `m.math`
| No module named 'm' Surely, I must be misreading the documentation or something, am I? |
From #181 (comment):
|
I wonder if it would be made easier if the period in m.css is replaced with an underscore “_” symbol. |
Nooo, that's ugly! In all seriousness, there's a proposed patch, so I think it's easier for everyone involved to just stay on 4.2 until this behavior is restored. Changing everything to an underscore means I need to change all docs, break compatibility with 4.2 (which would make a lot of existing users angry) and break also Python and Doxygen themes (because these use those plugins too). |
Unfortunately, I’ve taken the proposed fix and tried a few variants of my own but it looks like legacy plugins are screwed until next Python subsubversion. |
I seem to be having a related issue, but not with m.[plugin] plugins, rather the plugins directly under the Here is some of my debug output:
Snippets from my pelicanconf.py file:
If this is unrelated please let me know and I'll submit a new issue. |
Unable to import ansilexer from m.code. This breaks all syntax highlighting and also causes several articles not to render at all. Suggestion at mosra/m.css#181 is to pin the pelican version for now.
Same problem on Pelican 4.7. |
I cannot reproduce the problem on either pelican 4.7.0 or 4.7.1 with the methods specified at getpelican/pelican#2805 (the second one). Could you please specify how to reproduce it on pelican 4.7? |
@benlawraus: I can confirm the statement of @shniubobo that plugin loading generally works again (tested Pelican 4.7.0 and 4.7.1); e.g. with: PLUGIN_PATHS.append('themes/m.css/plugins')
PLUGINS.append('m.htmlsanity') But I also did experience the behavior that @ikeingtonbear mentioned. In my case the plugin …
import sys
…
PLUGIN_PATHS.append('themes/m.css/plugins')
…
PLUGINS.append('m.dot')
# maybe add a comment here:
sys.path.append('themes/m.css/plugins') |
I was mucking around with my Pelican plugins and ran into this same issue (I think). I was able to solve it my moving the plugin from a "raw" file into the |
Okay, sorry everyone that it took half a century for me to finally act on this matter. The remaining issue with the paths should be Now onto the remaining 100s of unresolved issues... |
With Pelican 4.5.0, the plugins cannot be loaded with
PLUGINS += ['m.x']
(wherex
is the plugin's name). A workaround is to put plugins outside of them
directory and usePLUGINS += ['x']
instead.This is to be fixed in later versions of Pelican.
Related issues: #178, getpelican/pelican#2805
The text was updated successfully, but these errors were encountered: