Getting KeyError after updating frappe-bench

154 views
Skip to first unread message

MP

unread,
Jul 8, 2014, 8:47:51 AM7/8/14
to erpnext-dev...@googlegroups.com
Hi All,

I updated frappe-bench today on my server using  ./scripts/update.sh from frappe-bench directory. I am getting below error after running  ./env/bin/honcho start from frappe-bench directory.

Traceback (most recent call last)

  • File "/var/www/frappe-bench/apps/frappe/frappe/middlewares.py", line 15, in __call__

    return super(StaticDataMiddleware, self).__call__(environ, start_response)
  • File "/var/www/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wsgi.py", line 588, in __call__

    return self.app(environ, start_response)
  • File "/var/www/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wsgi.py", line 588, in __call__

    return self.app(environ, start_response)
  • File "/var/www/frappe-bench/env/lib/python2.7/site-packages/werkzeug/local.py", line 224, in application

    return ClosingIterator(app(environ, start_response), self.cleanup)
  • File "/var/www/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wrappers.py", line 286, in application

    return f(*args[:-2] + (request,))(*args[-2:])
  • File "/var/www/frappe-bench/apps/frappe/frappe/app.py", line 80, in application

    response = frappe.website.render.render("message")
  • File "/var/www/frappe-bench/apps/frappe/frappe/website/render.py", line 44, in render

    data = render_page(path)
  • File "/var/www/frappe-bench/apps/frappe/frappe/website/render.py", line 99, in render_page

    return build(path)
  • File "/var/www/frappe-bench/apps/frappe/frappe/website/render.py", line 108, in build

    return build_method(path)
  • File "/var/www/frappe-bench/apps/frappe/frappe/website/render.py", line 121, in build_page

    context = get_context(path)
  • File "/var/www/frappe-bench/apps/frappe/frappe/website/context.py", line 35, in get_context

    context = build_context(context)
  • File "/var/www/frappe-bench/apps/frappe/frappe/website/context.py", line 71, in build_context

    context.data = render_blocks(context)
  • File "/var/www/frappe-bench/apps/frappe/frappe/website/template.py", line 32, in render_blocks

    _render_blocks(context["template"])
KeyError: u'template'

Am I doing anything wrong?

Kind regards,
Mayur Patel

Rushabh Mehta

unread,
Jul 9, 2014, 1:24:51 AM7/9/14
to erpnext-dev...@googlegroups.com
Try running `frappe --build_website` - I am not sure that is called in update.sh

(bench is due revision)


--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/a9173520-b6c5-48e8-b381-1ea24489db54%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

MP

unread,
Jul 9, 2014, 10:26:40 AM7/9/14
to erpnext-dev...@googlegroups.com
Hi Rushabh,

I executed frappe --build_website from sites directory. It outputs below.
Updating Pages                      : [========================================]
Updating Generators                 : [========================================]

I am still getting below error message after running  ./env/bin/honcho start from frappe-bench directory.

Traceback (most recent call last):
14:24:07 web.1        |   File "/var/www/frappe-bench/apps/frappe/frappe/middlewares.py", line 15, in __call__
14:24:07 web.1        |     return super(StaticDataMiddleware, self).__call__(environ, start_response)
14:24:07 web.1        |   File "/var/www/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wsgi.py", line 588, in __call__
14:24:07 web.1        |     return self.app(environ, start_response)
14:24:07 web.1        |   File "/var/www/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wsgi.py", line 588, in __call__
14:24:07 web.1        |     return self.app(environ, start_response)
14:24:07 web.1        |   File "/var/www/frappe-bench/env/lib/python2.7/site-packages/werkzeug/local.py", line 224, in application
14:24:07 web.1        |     return ClosingIterator(app(environ, start_response), self.cleanup)
14:24:07 web.1        |   File "/var/www/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wrappers.py", line 286, in application
14:24:07 web.1        |     return f(*args[:-2] + (request,))(*args[-2:])
14:24:07 web.1        |   File "/var/www/frappe-bench/apps/frappe/frappe/app.py", line 80, in application
14:24:07 web.1        |     response = frappe.website.render.render("message")
14:24:07 web.1        |   File "/var/www/frappe-bench/apps/frappe/frappe/website/render.py", line 44, in render
14:24:07 web.1        |     data = render_page(path)
14:24:07 web.1        |   File "/var/www/frappe-bench/apps/frappe/frappe/website/render.py", line 99, in render_page
14:24:07 web.1        |     return build(path)
14:24:07 web.1        |   File "/var/www/frappe-bench/apps/frappe/frappe/website/render.py", line 108, in build
14:24:07 web.1        |     return build_method(path)
14:24:07 web.1        |   File "/var/www/frappe-bench/apps/frappe/frappe/website/render.py", line 121, in build_page
14:24:07 web.1        |     context = get_context(path)
14:24:07 web.1        |   File "/var/www/frappe-bench/apps/frappe/frappe/website/context.py", line 35, in get_context
14:24:07 web.1        |     context = build_context(context)
14:24:07 web.1        |   File "/var/www/frappe-bench/apps/frappe/frappe/website/context.py", line 71, in build_context
14:24:07 web.1        |     context.data = render_blocks(context)
14:24:07 web.1        |   File "/var/www/frappe-bench/apps/frappe/frappe/website/template.py", line 32, in render_blocks
14:24:07 web.1        |     _render_blocks(context["template"])
14:24:07 web.1        | KeyError: u'template'

Any idea?

Kind regards,
Mayur Patel

Anand Doshi

unread,
Jul 9, 2014, 12:15:25 PM7/9/14
to ERPNext Developer's Forum
Hi Mayur,

I think update didn't work in your case.

Please try frappe --latest

-Anand.


--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.

MP

unread,
Jul 10, 2014, 11:17:54 AM7/10/14
to erpnext-dev...@googlegroups.com
Thanks Anand. It worked. I used frappe --latest [path to the site].
Will I be able to use ./script/update.sh in the future?

Kind regards,
Mayur Patel

Rushabh Mehta

unread,
Jul 10, 2014, 12:34:02 PM7/10/14
to erpnext-dev...@googlegroups.com
Yes - a new bench is coming though which will make this a lot lot easier
--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages