jekyll-postfiles: Invalide byte sequence in UTF-8
Hi, I have an error even before building, just executing jekyll doctor.
Error: could not read file /Users/boris/Projects/perso/blog/jekyll-private/_posts/fr/papa/2016/2016-07-09-et-le-feu-ca-brule/1.jpg: invalid byte sequence in UTF-8
The same error is produced when I try to serve in verbose mode, I got this:
...
EntryFilter: excluded /scripts
EntryFilter: excluded /tasks
EntryFilter: excluded /vendor
Reading: _posts/en/default/2005-01-01-typo-test/2005-01-01-typo-test.md
Reading: _posts/en/default/2014/2014-03-13-conquering-ab-testing/2014-03-13-conquering-ab-testing.md
...
...
Reading: _posts/fr/papa/2016/2016-07-01-esperanto/2016-07-01-esperanto.md
Reading: _posts/fr/papa/2016/2016-07-09-et-le-feu-ca-brule/1.jpg
Error: could not read file /Users/boris/Projects/perso/blog/jekyll-private/_posts/fr/papa/2016/2016-07-09-et-le-feu-ca-brule/1.jpg: invalid byte sequence in UTF-8
Reading: _posts/fr/papa/2016/2016-07-09-et-le-feu-ca-brule/2016-07-09-et-le-feu-ca-brule.md
Reading: _posts/fr/papa/2016/2016-07-10-tonton-et-tatie/2016-07-10-tonton-et-tatie.md
...
...
Reading: _confs/sensibilisation-web.md
Reading: _confs/web-disruption-continue.md
Rendering: 2016/index.html
Pre-Render Hooks: 2016/index.html
Rendering Liquid: 2016/index.html
Rendering Markup: 2016/index.html
Rendering Layout: 2016/index.html
Rendering: _posts/fr/default/2016/2016-06-15-conseils-pour-les-etudiants/2016-06-15-conseils-pour-les-etudiants.md
Pre-Render Hooks: _posts/fr/default/2016/2016-06-15-conseils-pour-les-etudiants/2016-06-15-conseils-pour-les-etudiants.md
Rendering Liquid: _posts/fr/default/2016/2016-06-15-conseils-pour-les-etudiants/2016-06-15-conseils-pour-les-etudiants.md
Rendering Markup: _posts/fr/default/2016/2016-06-15-conseils-pour-les-etudiants/2016-06-15-conseils-pour-les-etudiants.md
Requiring: kramdown
Rendering: _posts/fr/papa/2016/2016-06-26-la-blockchain-expliquee-a-un-enfant-de-cinq-ans/2016-06-26-la-blockchain-expliquee-a-un-enfant-de-cinq-ans.md
Pre-Render Hooks: _posts/fr/papa/2016/2016-06-26-la-blockchain-expliquee-a-un-enfant-de-cinq-ans/2016-06-26-la-blockchain-expliquee-a-un-enfant-de-cinq-ans.md
Rendering Liquid: _posts/fr/papa/2016/2016-06-26-la-blockchain-expliquee-a-un-enfant-de-cinq-ans/2016-06-26-la-blockchain-expliquee-a-un-enfant-de-cinq-ans.md
Rendering Markup: _posts/fr/papa/2016/2016-06-26-la-blockchain-expliquee-a-un-enfant-de-cinq-ans/2016-06-26-la-blockchain-expliquee-a-un-enfant-de-cinq-ans.md
Liquid Exception: undefined method `gsub' for nil:NilClass in _layouts/archives-year.html
jekyll 3.2.0 | Error: undefined method `gsub' for nil:NilClass
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 36 (19 by maintainers)
Commits related to this issue
- The date at the beginning of the image file names broke Jekyll… — committed to nhoizey/nicolas-hoizey.com by nhoizey 7 years ago
- Adding jekyll-postfiles plugins It's a lot more intuitive to me to put files alongside the blog post. So using a plugin that lets me do that. There's also a caveat that, with the choice for semantic... — committed to toumorokoshi/toumorokoshi.github.com by toumorokoshi 3 years ago
Ok, thanks @w1ne ! 🙏
@nhoizey I’m not able to reproduce the issue, so it seems to be fixed.
Hi. I am having the exact same issue. Jekyll version
3.7.3. My posts directory looks likeRunning
bundle exec jekyll buildgives the errorHowever, when I rename the directory containing the image files, I no longer get an error. I.e. with the following directory structure, everything is fine.
Just understood why I had this error with these two files: it’s because the file names were starting with dates.
2004-09-26-Catching-the-sun.jpgfor example.I suppose Jekyll was messing with these files, thinking they were posts.
So… I don’t have the issue anymore after renaming the image files.
@borisschapira @RRMoelker @DirtyF do you still have the issue?