Internal Server Error- AttributeError


I have this error when I try to “bench build” in mode production.
I try to launch “bench restart” but I have this error :

[2019-01-09 08:48:28 +0000] [23144] [ERROR] Error handling request /login
Traceback (most recent call last):
File “/opt/bench/erpnext/env/local/lib/python2.7/site-packages/gunicorn/workers/”, line 135, in handle
self.handle_request(listener, req, client, addr)
File “/opt/bench/erpnext/env/local/lib/python2.7/site-packages/gunicorn/workers/”, line 176, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File “/opt/bench/erpnext/env/local/lib/python2.7/site-packages/werkzeug/”, line 228, in application
return ClosingIterator(app(environ, start_response), self.cleanup)
File “/opt/bench/erpnext/env/local/lib/python2.7/site-packages/werkzeug/”, line 308, in application
resp = f(*args[:-2] + (request,))
File “/opt/bench/erpnext/apps/frappe/frappe/”, line 81, in application
response = handle_exception(e)
File “/opt/bench/erpnext/apps/frappe/frappe/”, line 188, in handle_exception
File “/opt/bench/erpnext/apps/frappe/frappe/website/”, line 75, in render
data = render_page(path)
File “/opt/bench/erpnext/apps/frappe/frappe/website/”, line 158, in render_page
return build(path)
File “/opt/bench/erpnext/apps/frappe/frappe/website/”, line 165, in build
return build_page(path)
File “/opt/bench/erpnext/apps/frappe/frappe/website/”, line 181, in build_page
html = frappe.render_template(context.source, context)
File “/opt/bench/erpnext/apps/frappe/frappe/utils/”, line 75, in render_template
return get_jenv().from_string(template).render(context)
File “/opt/bench/erpnext/env/local/lib/python2.7/site-packages/jinja2/”, line 1008, in render
return self.environment.handle_exception(exc_info, True)
File “/opt/bench/erpnext/env/local/lib/python2.7/site-packages/jinja2/”, line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File “”, line 1, in top-level template code
File “/opt/bench/erpnext/apps/frappe/frappe/./templates/web.html”, line 6, in top-level template code
{%- if page_or_generator==“Generator” %}source-type=“Generator” data-doctype=“{{ doctype }}”{% endif %}
File “/opt/bench/erpnext/apps/frappe/frappe/./templates/base.html”, line 17, in top-level template code
{%- block head -%}
File “/opt/bench/erpnext/apps/frappe/frappe/./templates/base.html”, line 23, in block “head”

File “/opt/bench/erpnext/apps/frappe/frappe/website/”, line 187, in abs_url
if path.startswith(‘http://’) or path.startswith(‘https://’):
AttributeError: ‘tuple’ object has no attribute ‘startswith’

I search diffent solution in different Topic but all cmd of the community who try to resolve this problem doesn’t work with my error.

Help me,

Perhaps this link will help