Skip to content
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

test_rmd_reader AttributeError: 'NoneType' object has no attribute 'knit' #896

Closed
chrplr opened this issue May 16, 2017 · 1 comment
Closed

Comments

@chrplr
Copy link

chrplr commented May 16, 2017

Hello,

When I run python test_rmd_reader.py, I get the following error.

DEBUG:root:/pelican-plugins/rmd_reader
DEBUG:root:/pelican-plugins/rmd_reader/test-content
DEBUG:root:/pelican-plugins/rmd_reader/test-content/test.rmd
DEBUG:root:/pelican-plugins/rmd_reader/test-output
WARNING:pelican.settings:Feeds generated without SITEURL set properly may not be valid
WARNING:pelican.settings:No timezone information specified in the settings. Assuming your timezone is UTC for feed generation. Check http://docs.getpelican.com/en/latest/settings.html#timezone for more information
DEBUG:pelican:Adding current directory to system path
DEBUG:pelican:Temporarily adding PLUGIN_PATHS to system path
DEBUG:pelican:Loading plugin `rmd_reader`
DEBUG:pelican:Registering plugin `rmd_reader`
DEBUG:pelican:Restoring system path
DEBUG:RMD_READER:STARTING R
DEBUG:pelican.generators:Template list: [u'!simple/archives.html', u'!simple/article.html', u'!simple/author.html', u'!simple/authors.html', u'!simple/base.html', u'!simple/categories.html', u'!simple/category.html', u'!simple/gosquared.html', u'!simple/index.html', u'!simple/page.html', u'!simple/pagination.html', u'!simple/period_archives.html', u'!simple/tag.html', u'!simple/tags.html', u'!simple/translations.html', u'analytics.html', u'archives.html', u'article.html', u'article_infos.html', u'author.html', u'authors.html', u'base.html', u'categories.html', u'category.html', u'comments.html', u'disqus_script.html', u'github.html', u'gosquared.html', u'index.html', u'page.html', u'pagination.html', u'period_archives.html', u'tag.html', u'taglist.html', u'tags.html', u'translations.html', u'twitter.html']
DEBUG:pelican.readers:Read file test.rmd -> Article
DEBUG:pelican.readers:Signal article_generator_preread.send(ArticlesGenerator)
DEBUG:RMD_READER:RMD_READER_KNITR_QUIET = True
DEBUG:RMD_READER:RMD_READER_KNITR_ENCODING = UTF-8
DEBUG:RMD_READER:RMD_READER_CLEANUP = True
DEBUG:RMD_READER:RMD_READER_RENAME_PLOT = disable
ERROR:pelican.generators:Could not process ./test.rmd
AttributeError: 'NoneType' object has no attribute 'knit'

And when I run make html, rmd_reader crasheds on the .rmd file with the following error message:
| NameError: global name 'R_OBJECTS' is not defined

Note: the python module rpy2 is installed, as well as the R package knitr

Any hint?

@chrplr
Copy link
Author

chrplr commented May 16, 2017

Hum, thisb is a python configuration issue I guess:

python test_rmd_reader.py fails, but
ipython test_rmd_reader.py works fine

(both python and ipython are from anaconda2 distrib)

The problem was solved by replacing libreadline.so.6 distributed by anaconda2 by the system (ubuntu 16.04) libreadline.so.6 (see ContinuumIO/anaconda-issues#152):

 cp /lib/x86_64-linux-gnu/libreadline.so.6 /home/..../anaconda2/lib/libreadline.so.6

So I close the issue.

@chrplr chrplr closed this as completed May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant