Getting KeyError after updating frappe-bench

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



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-forum+un…@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.
Try running `frappe --build_website` - I am not sure that is called in update.sh

(bench is due revision)


On 08-Jul-2014, at 6:17 pm, MP <ma...@gmail.com> wrote:

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



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-forum+un…@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.



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/0F39D84A-35FB-45D3-BDEE-9786E7B65BC4%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
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



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/891a8920-27ab-48a8-a529-8e63c2b2e91b%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Hi Mayur,

I think update didn't work in your case.

Please try frappe --latest

-Anand.


On Wed, Jul 9, 2014 at 7:56 PM, MP <ma…@gmail.com> wrote:

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



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-forum+un…@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/891a8920-27ab-48a8-a529-8e63c2b2e91b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAAQzbF0peTZSHNhSasGisokmx2agu4HONBWXYLBPaSenhm%2BeUA%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.
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



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/5b00627a-5f09-477f-8af3-9ed860f6dcc0%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Yes - a new bench is coming though which will make this a lot lot easier


On 10-Jul-2014, at 8:47 pm, MP <ma...@gmail.com> wrote:

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



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/5b00627a-5f09-477f-8af3-9ed860f6dcc0%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/AA014BA9-AD0F-42FC-A133-0A6F27E82DA9%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.