danielfrg / pelican-jupyter

Pelican plugin for blogging with Jupyter/IPython Notebooks
Apache License 2.0
423 stars 105 forks source link

AttributeError: 'module' object has no attribute 'register' #74

Closed cmertin closed 6 years ago

cmertin commented 7 years ago

Can not compile. Based on this issue with org_pandoc_reader, I believe it's a problem with the newer versions of pelican. I get the following error when attempting to compile

Traceback (most recent call last):                                                                                        
    File "/usr/bin/pelican", line 9, in <module>                                                                              
        load_entry_point('pelican==3.6.3', 'console_scripts', 'pelican')()                                                    
    File "/usr/lib/python2.7/dist-packages/pelican/__init__.py", line 386, in main                                            
        pelican, settings = get_instance(args)                                                                                
    File "/usr/lib/python2.7/dist-packages/pelican/__init__.py", line 380, in get_instance                                    
        return cls(settings), settings                                                                                        
    File "/usr/lib/python2.7/dist-packages/pelican/__init__.py", line 57, in __init__                                         
        self.init_plugins()                                                                                                   
    File "/usr/lib/python2.7/dist-packages/pelican/__init__.py", line 84, in init_plugins                                     
        plugin.register()                                                                                                   
AttributeError: 'module' object has no attribute 'register'
leblancfg commented 6 years ago

Same issue here.

brianedelman commented 6 years ago

+1

leblancfg commented 6 years ago

Fixed this locally, I was calling the plugin naively with:

PLUGIN_PATHS = ['./plugins']
PLUGINS = ['ipynb']

Should have instead have been done with

PLUGIN_PATHS = ['./plugins']
PLUGINS = ['ipynb.markup']

Clarified README.md to reflect this, see pull request #76 above.

danielfrg commented 6 years ago

Fixed on the README now. Thanks!