# Liquid error: wrong number of arguments

**URL:** <https://talk.jekyllrb.com/t/liquid-error-wrong-number-of-arguments/732>\
**Category:** Help\
**Created:** [July 2, 2017, 1:05pm UTC](https://talk.jekyllrb.com/t/liquid-error-wrong-number-of-arguments/732 "2017-07-02T13:05:42Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![gvdm](https://avatars.discourse-cdn.com/v4/letter/g/aca169/32.png) [@gvdm](https://talk.jekyllrb.com/u/gvdm)\
**Post date:** [July 2, 2017, 1:05pm UTC](https://talk.jekyllrb.com/t/liquid-error-wrong-number-of-arguments/732/1 "2017-07-02T13:05:42Z")

</div>

I’m getting Liquid errors about `wrong number of arguments` when I try to `jekyll build` after my latest updates to the template files. I’ve gone through the updates a number of times, but can’t see anything problematic. I’m also not a Ruby or Liquid expert so I’m having trouble interpreting the error message.

`Liquid Exception: Liquid error (line 19): wrong number of arguments (1 for 2) in /_layouts/standard.html`

Any help would be much appreciated. You can see the CI build log [here](https://semaphoreci.com/gisforgabriel/cv-olio/branches/master/builds/45) and repo is on GitHub

* * *

(I found the following thread, but it’s unrelated to my issue - I’m using no plugins.)

> [@What is this error that I am receiving?](http://talk.jekyllrb.com/t/what-is-this-error-that-i-am-receiving/722):
>
> I have no clue what is going on? I’m starting a new project and getting the following message in terminal: -bash: /Users/christians/.rvm/scripts/initialize: No such file or directory -bash: /Users/christians/.rvm/scripts/hook: No such file or directory then Deprecation: The 'gems' configuration option has been renamed to 'plugins'. Please update your config file accordingly. then E, [2017-06-29T09:20:48.907911 #1072] ERROR -- : fsevent: running worker failed: wrong number of arguments (give…

---

<div class="post-metadata">

**Author:** ![tomjohnson1492](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/tomjohnson1492/32/39_2.png) [@tomjohnson1492](https://talk.jekyllrb.com/u/tomjohnson1492)\
**Post date:** [July 2, 2017, 9:11pm UTC](https://talk.jekyllrb.com/t/liquid-error-wrong-number-of-arguments/732/2 "2017-07-02T21:11:34Z")

</div>

You could try removing Gemfile.lock, and then run “bundle install” again. That might fix it. I had this problem the other day but assumed it was due to something else I was doing. I eventually fixed it. It was a Bundler gem issue, not necessarily something in my theme.

---

<div class="post-metadata">

**Author:** ![gvdm](https://avatars.discourse-cdn.com/v4/letter/g/aca169/32.png) [@gvdm](https://talk.jekyllrb.com/u/gvdm)\
**Post date:** [July 3, 2017, 8:10pm UTC](https://talk.jekyllrb.com/t/liquid-error-wrong-number-of-arguments/732/4 "2017-07-03T20:10:45Z")

</div>

Thanks Tom, it looks like it is to do with `bundler`. Recreating the lock file hasn’t directly resolved the issue, but has got me looking on the right track. Just in time too - couldn’t face another review of my template files 🙂

I’ve got problems with installing the right version of `rb-fsevent`. Even after a clean install of Jekyll 3.5.0, there are dependency issues with listen. It looks like I’m not the only one, but surprised there aren’t more reports. [https://github.com/guard/listen/pull/432](https://github.com/guard/listen/pull/432)

* * *

I’ve now uninstalled all gems and installed `jekyll` and `bundler` from scratch. I’m still getting the issue. This is consistent with the CI build log above. I’ve now run it with `--trace` too and get an additional error which might help.

`Liquid Exception: Liquid error (line 19): wrong number of arguments (1 for 2) in /_layouts/standard.html bundler: failed to load command: jekyll (/home/runner/.rbenv/versions/2.2.2/bin/jekyll)`

Still confused… 😕

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [July 3, 2017, 9:52pm UTC](https://talk.jekyllrb.com/t/liquid-error-wrong-number-of-arguments/732/5 "2017-07-03T21:52:43Z")

</div>

if you remove that one layout (or replace it contents with something simple) does it still give an error?

---

<div class="post-metadata">

**Author:** ![tomjohnson1492](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/tomjohnson1492/32/39_2.png) [@tomjohnson1492](https://talk.jekyllrb.com/u/tomjohnson1492)\
**Post date:** [July 3, 2017, 11:37pm UTC](https://talk.jekyllrb.com/t/liquid-error-wrong-number-of-arguments/732/6 "2017-07-03T23:37:52Z")

</div>

Sorry, I wish I could be more help, but I wasn’t paying close attention when I was troubleshooting this same problem on my machine. I did a number of things – gem clean, gem uninstall jekyll (uninstalled all jekyll versions, then re-installed), updated bundler, updated rubygems, made ruby directory (usr, not system) writeable, restarted computer). I was changing a jekyll theme I’d written from gem-based to hard-coded and thought this error was related somehow to that, but later realized it must have something to do with bundler and jekyll 3.5.0. you might see if you have some other gem dependency (like github-pages) that is requiring some older version of a gem or jekyll that is causing conflicts. sorry I can’t be more help. you might try filing an issue in the Jekyllrb repo.

---

<div class="post-metadata">

**Author:** ![mmistakes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mmistakes/32/2169_2.png) [@mmistakes](https://talk.jekyllrb.com/u/mmistakes)\
**Post date:** [July 4, 2017, 12:27am UTC](https://talk.jekyllrb.com/t/liquid-error-wrong-number-of-arguments/732/7 "2017-07-04T00:27:43Z")

</div>

Are prepending your Jekyll commands with `bundle exec`? If not give that a go as you likely have dependency conflicts from having multiple versions installed and this will get around that by using the versions specified in your `Gemfile.lock`

```auto
bundle exec jekyll serve

bundle exec jekyll build

```

---

<div class="post-metadata">

**Author:** ![chromatical](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chromatical/32/278_2.png) [@chromatical](https://talk.jekyllrb.com/u/chromatical)\
**Post date:** [July 4, 2017, 4:10pm UTC](https://talk.jekyllrb.com/t/liquid-error-wrong-number-of-arguments/732/8 "2017-07-04T16:10:10Z")

</div>

I think I figured it out. I poked around your template files for a few minutes and found a missing colon in line 19 of `_includes/cv_structured_data.html` (included in `_layouts/standard.html`). Inserting a colon after `append` fixes it.

I’m not sure why Liquid reports the error in the layout file. I tried some tests on my own and found that it always reports filter errors in the layout file but will correctly report other errors (such as an unclosed if tag) in the include file.

---

<div class="post-metadata">

**Author:** ![gvdm](https://avatars.discourse-cdn.com/v4/letter/g/aca169/32.png) [@gvdm](https://talk.jekyllrb.com/u/gvdm)\
**Post date:** [July 4, 2017, 6:57pm UTC](https://talk.jekyllrb.com/t/liquid-error-wrong-number-of-arguments/732/9 "2017-07-04T18:57:58Z")

</div>

Big thanks to @tomjohnson1492, @rdyar & @mmistakes, but I owe @chromatical a drink (or two) 😉

The error was reported on line 19 of a `standard.html`, but turned out to be on line 19 of an `include` which features on line 93 of `standard.html` (and is neither the first, nor last `include` on that template). I’m not surprised it wasn’t the first thing I thought of…

@chromatical Is it worth reporting the lack of filter error reporting at include level as a bug?

---

<div class="post-metadata">

**Author:** ![chromatical](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chromatical/32/278_2.png) [@chromatical](https://talk.jekyllrb.com/u/chromatical)\
**Post date:** [July 4, 2017, 9:21pm UTC](https://talk.jekyllrb.com/t/liquid-error-wrong-number-of-arguments/732/10 "2017-07-04T21:21:17Z")

</div>

@gvdm I’m mostly a teetotaller, but I’ll take a hot mug of English Breakfast any day! 😁

I looked through both the Jekyll and Liquid issues and couldn’t find anything related to this, so I think it’s worth reporting. I’ll go ahead and open an issue.

---

<div class="post-metadata">

**Author:** ![chromatical](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chromatical/32/278_2.png) [@chromatical](https://talk.jekyllrb.com/u/chromatical)\
**Post date:** [July 4, 2017, 11:52pm UTC](https://talk.jekyllrb.com/t/liquid-error-wrong-number-of-arguments/732/11 "2017-07-04T23:52:24Z")

</div>

@gvdm Here’s the issue I created.  
[https://github.com/jekyll/jekyll/issues/6203](https://github.com/jekyll/jekyll/issues/6203)

---

<div class="post-metadata">

**Author:** ![gvdm](https://avatars.discourse-cdn.com/v4/letter/g/aca169/32.png) [@gvdm](https://talk.jekyllrb.com/u/gvdm)\
**Post date:** [July 9, 2017, 8:30pm UTC](https://talk.jekyllrb.com/t/liquid-error-wrong-number-of-arguments/732/12 "2017-07-09T20:30:32Z")

</div>

Top man! 😉 ☕
