Error: Update WP theme paths – no attribute 'stdout_lines'

Deploying a fresh Roots install to staging server when I get this error:

TASK [deploy : Update WP theme paths] ******************************************
task path: /Users/masoninthesis/Sites/amz-gift-0001.1/trellis/roles/deploy/hooks/finalize-after.yml:11
System info:
  Ansible 2.2.0.0; Darwin
  Trellis at "Add ansible_local support for non-Windows"
---------------------------------------------------
'dict object' has no attribute 'stdout_lines'
fatal: [amz-gift-0001.1]: FAILED! => {
    "failed": true
}

In verbose output I also see this potentially useful fail/skip error:

TASK [deploy : Get WP theme template and stylesheet roots] *********************
task path: /Users/masoninthesis/Sites/amz-gift-0001.1/trellis/roles/deploy/hooks/finalize-before.yml:15
skipping: [amz-gift-0001.1] => (item=template_root)  => {
    "changed": false,
    "item": "template_root",
    "skip_reason": "Conditional check failed",
    "skipped": true
}
skipping: [amz-gift-0001.1] => (item=stylesheet_root)  => {
    "changed": false,
    "item": "stylesheet_root",
    "skip_reason": "Conditional check failed",
    "skipped": true
}

I’ve read through this related issue and tried the solutions. My issues are not the same but I have a feeling they’re related.

Another potentially related issue is that I tried activating Sage via WP-CLI and I got an error: Error: Stylesheet is missing.

One more coincidence seems to be @fullyint 's recent WP Theme Path updates to Trellis in past few days. Particularly in /roles/deploy/hooks/finalize-after.yml. I’ll update if I make any headway. Thanks!

@masoninthesis It looks like when the “Get WP theme template and stylesheet roots” task skips, we need a default value set for stdout_lines. Try this single edit to with_subelements.

2 Likes

You the man Phil!

That did the trick, thank you.