You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if you run the attached server and visit localhost:8080/myroute/foo, you get a template error:
will now serve on port 8080
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 12, in _error_handler
response = request.invoke_exception_view(exc_info)
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/view.py", line 756, in invoke_exception_view
raise HTTPNotFound
pyramid.httpexceptions.HTTPNotFound: The resource could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.5/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/router.py", line 270, in __call__
response = self.execution_policy(environ, self)
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/router.py", line 278, in default_execution_policy
return request.invoke_exception_view(reraise=True)
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/view.py", line 755, in invoke_exception_view
reraise_(*exc_info)
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/compat.py", line 148, in reraise
raise value
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/router.py", line 276, in default_execution_policy
return router.invoke_request(request)
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/router.py", line 249, in invoke_request
response = handle_request(request)
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 41, in excview_tween
response = _error_handler(request, exc)
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 16, in _error_handler
reraise(*exc_info)
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/compat.py", line 148, in reraise
raise value
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/tweens.py", line 39, in excview_tween
response = handler(request)
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/router.py", line 156, in handle_request
view_name
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/view.py", line 642, in _call_view
response = view_callable(context, request)
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/viewderivers.py", line 462, in rendered_view
request, result, view_inst, context)
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/renderers.py", line 435, in render_view
return self.render_to_response(response, system, request=request)
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/renderers.py", line 458, in render_to_response
result = self.render(value, system_values, request=request)
File "/home/pi/.local/lib/python3.5/site-packages/pyramid/renderers.py", line 454, in render
result = renderer(value, system_values)
File "/home/pi/.local/lib/python3.5/site-packages/pyramid_chameleon/zpt.py", line 47, in __call__
result = self.template(**system)
File "/home/pi/.local/lib/python3.5/site-packages/chameleon/template.py", line 124, in __call__
return self.render(**kwargs)
File "/home/pi/.local/lib/python3.5/site-packages/chameleon/zpt/template.py", line 297, in render
return super(PageTemplate, self).render(**_kw)
File "/home/pi/.local/lib/python3.5/site-packages/chameleon/template.py", line 191, in render
raise_with_traceback(exc, tb)
File "/home/pi/.local/lib/python3.5/site-packages/chameleon/utils.py", line 75, in raise_with_traceback
raise exc
File "/home/pi/.local/lib/python3.5/site-packages/chameleon/template.py", line 171, in render
self._render(stream, econtext, rcontext)
File "index_161d98e17b5a3f24d86304929b34b0af.py", line 200, in render
File "/home/pi/.local/lib/python3.5/site-packages/chameleon/zpt/template.py", line 301, in include
self._render(*args, **kwargs)
File "base_9068126ef4690e8b4198d76bc88e1dfb.py", line 305, in render
File "index_161d98e17b5a3f24d86304929b34b0af.py", line 136, in __fill_content
File "/home/pi/.local/lib/python3.5/site-packages/chameleon/utils.py", line 406, in __getitem__
raise NameError(key)
NameError: undecl_name
- Expression: "pair[0]"
- Filename: /home/pi/code/pathbug/project/templates/base.pt
- Location: (line 14: col 75)
- Source: ... oute/${pair[1]}" tal:content="pair[0]" /></li>
^^^^^^^
- Expression: "load: base.pt"
- Filename: /home/pi/code/pathbug/project/templates/index.pt
- Location: (line 1: col 23)
- Source: <metal:main use-macro="load: base.pt">
^^^^^^^^^^^^^
- Arguments: get_csrf_token: <partial - at 0x75deab70>
content: some spec content
request: <Request - at 0x75dd4b90>
repeat: {...} (0)
current_spec: sec
view: <function art_desc at 0x75dd38e8>
target_language: <NoneType - at 0x3e5788>
macroname: load: base.pt
context: <DefaultRootFactory None at 0x75dd4bb0>
renderer_name: templates/index.pt
renderer_info: <RendererHelper - at 0x75dd4e50>
req: <Request - at 0x75dd4b90>
tuples: <list - at 0x75e47328>
192.168.178.5 - - [16/Feb/2018 00:07:10] "GET /myroute/sec HTTP/1.1" 500 59
the problem is the 'undecl_name' in the file templates/index.pt. The NameError mentions that, but the following info is misleading. It looks like the error is in base.pt in the expression pair[0]. but that is not the case!
I think you only need chameleon, waitress and pyramid to run this project. bad_err.tar.gz
The text was updated successfully, but these errors were encountered:
I'm not sure if this is the right place for this.
if you run the attached server and visit localhost:8080/myroute/foo, you get a template error:
the problem is the 'undecl_name' in the file
templates/index.pt
. The NameError mentions that, but the following info is misleading. It looks like the error is in base.pt in the expression pair[0]. but that is not the case!I think you only need chameleon, waitress and pyramid to run this project.
bad_err.tar.gz
The text was updated successfully, but these errors were encountered: