Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

portal_state not available #22

Closed
rpatterson opened this issue Jul 21, 2011 · 1 comment
Closed

portal_state not available #22

rpatterson opened this issue Jul 21, 2011 · 1 comment

Comments

@rpatterson
Copy link

Here's the latest failure I'm getting under five.pt 2.1.2 that I'm not getting without it:

Failed example:
browser.open(portal.news.absolute_url())
Exception raised:
Traceback (most recent call last):
File "/home/xen/src/python/parts/opt/lib/python2.7/doctest.py", line 1254, in **run
compileflags, 1) in test.globs
File "<doctest autogroup.txt[17]>", line 1, in
browser.open(portal.news.absolute_url())
File "/usr/local/lib/python/site-packages/zope.testbrowser-3.6.0a2-py2.7.egg/zope/testbrowser/browser.py", line 239, in open
self.mech_browser.open(url, data)
File "/usr/local/lib/python/site-packages/mechanize-0.1.11-py2.7.egg/mechanize/_mechanize.py", line 209, in open
return self._mech_open(url, data, timeout=timeout)
File "/usr/local/lib/python/site-packages/mechanize-0.1.11-py2.7.egg/mechanize/_mechanize.py", line 236, in _mech_open
response = UserAgentBase.open(self, request, data)
File "/usr/local/lib/python/site-packages/mechanize-0.1.11-py2.7.egg/mechanize/_opener.py", line 191, in open
response = urlopen(self, req, data)
File "/home/xen/src/python/parts/opt/lib/python2.7/urllib2.py", line 412, in _open
'_open', req)
File "/home/xen/src/python/parts/opt/lib/python2.7/urllib2.py", line 372, in _call_chain
result = func(_args)
File "/usr/local/lib/python/site-packages/Zope2-2.12.19-py2.7-linux-i686.egg/Products/Five/testbrowser.py", line 85, in http_open
return self.do_open(PublisherConnection, req)
File "/home/xen/src/python/parts/opt/lib/python2.7/urllib2.py", line 1168, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/usr/local/lib/python/site-packages/zope.testbrowser-3.6.0a2-py2.7.egg/zope/testbrowser/testing.py", line 82, in request
self.response = self.caller(request_string, handle_errors)
File "/usr/local/lib/python/site-packages/Zope2-2.12.19-py2.7-linux-i686.egg/Testing/ZopeTestCase/functional.py", line 40, in wrapped_func
return func(_args, kw)
File "/usr/local/lib/python/site-packages/Zope2-2.12.19-py2.7-linux-i686.egg/Testing/ZopeTestCase/zopedoctest/functional.py", line 188, in http
debug=not handle_errors,
File "/usr/local/lib/python/site-packages/Zope2-2.12.19-py2.7-linux-i686.egg/ZPublisher/Test.py", line 204, in publish_module
response = publish(request, module_name, after_list, debug=debug)
File "/usr/local/lib/python/site-packages/Zope2-2.12.19-py2.7-linux-i686.egg/ZPublisher/Publish.py", line 127, in publish
request, bind=1)
File "/usr/local/lib/python/site-packages/Zope2-2.12.19-py2.7-linux-i686.egg/ZPublisher/mapply.py", line 77, in mapply
if debug is not None: return debug(object,args,context)
File "/usr/local/lib/python/site-packages/Zope2-2.12.19-py2.7-linux-i686.egg/ZPublisher/Publish.py", line 47, in call_object
result=apply(object,args) # Type s to step into published object.
File "/usr/local/lib/python/site-packages/Zope2-2.12.19-py2.7-linux-i686.egg/Shared/DC/Scripts/Bindings.py", line 324, in __call

return self._bindAndExec(args, kw, None)
File "/usr/local/lib/python/site-packages/Zope2-2.12.19-py2.7-linux-i686.egg/Shared/DC/Scripts/Bindings.py", line 361, in _bindAndExec
return self._exec(bound_data, args, kw)
File "/usr/local/lib/python/site-packages/Products.CMFCore-2.2.4-py2.7.egg/Products/CMFCore/FSPageTemplate.py", line 240, in _exec
result = self.pt_render(extra_context=bound_names)
File "/usr/local/lib/python/site-packages/Products.CMFCore-2.2.4-py2.7.egg/Products/CMFCore/FSPageTemplate.py", line 180, in pt_render
self, source, extra_context
File "/usr/local/lib/python/site-packages/Zope2-2.12.19-py2.7-linux-i686.egg/Products/PageTemplates/PageTemplate.py", line 80, in pt_render
showtal=showtal)
File "/usr/local/lib/python/site-packages/zope.pagetemplate-3.5.2-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 113, in pt_render
strictinsert=0, sourceAnnotations=sourceAnnotations)()
File "/usr/local/lib/python/site-packages/five.pt-2.1.2-py2.7.egg/five/pt/patches.py", line 127, in call
result = self.template.render(**context)
File "/usr/local/lib/python/site-packages/z3c.pt-2.0-py2.7.egg/z3c/pt/pagetemplate.py", line 118, in render
return base_renderer(**context)
File "/usr/local/lib/python/site-packages/Chameleon-2.0-py2.7.egg/chameleon/zpt/template.py", line 107, in render
return super(PageTemplate, self).render(**k)
File "/usr/local/lib/python/site-packages/Chameleon-2.0-py2.7.egg/chameleon/template.py", line 183, in render
raise_with_traceback(exc, tb)
File "/usr/local/lib/python/site-packages/Chameleon-2.0-py2.7.egg/chameleon/template.py", line 167, in render
self._render(stream, econtext, rcontext)
File "/tmp/tmpP8xWU3/db28e1f8470b8e0b414e8d07498c64644bca4211.py", line 2079, in render
__macro.include(__stream, econtext.copy(), rcontext)
File "/tmp/tmpP8xWU3/182e39a889e4b8a1b7a65b6822d7107dd61a0782.py", line 1263, in render_master
__value = _static_219137548(getitem('portal_state'), getitem('request'), True, 'language')
File "/usr/local/lib/python/site-packages/five.pt-2.1.2-py2.7.egg/five/pt/expressions.py", line 113, in call
base, name, path_items[i:], request=request)
File "/usr/local/lib/python/site-packages/zope.traversing-3.7.1-py2.7.egg/zope/traversing/adapters.py", line 139, in traversePathElement
return traversable.traverse(nm, further_path)
- traceback_info: (None, 'language')
File "/usr/local/lib/python/site-packages/zope.traversing-3.7.1-py2.7.egg/zope/traversing/adapters.py", line 53, in traverse
raise LocationError(subject, name)
- traceback_info: (None, 'language', ())
RenderError: An uncaught exception was raised.

LocationError: (None, 'language')

 - Expression: "portal_state/language"
 - Filename:   <string>
 - Location:   (10:10)
 - Arguments:  __slot_content_core: <list - at 0xe27cf8c>
               repeat: {...} (0)
               template: <ImplicitAcquisitionWrapper folder_summary_view at 0xdfb3d9c>
               exists: <instancemethod evaluate_exists at 0xcfb1d9c>
               modules: <instance - at 0xa9f8a6c>
               here: <instance - at 0xdd87d4c>
               user: <ImplicitAcquisitionWrapper - at 0xdfb3e8c>
               nothing: <NoneType - at 0x81904d8>
               path: <instancemethod evaluate_path at 0xcfb1b1c>
               traverse_subpath: <list - at 0xdfa7d4c>
               convert: <function translate at 0xdfb4d84>
               container: <ImplicitAcquisitionWrapper plone at 0xdfb32fc>
               default: <object - at 0xb77ff678L>
               __error__: <list - at 0xe59704c>
               request: <instance - at 0xdfb0dec>
               wrapped_repeat: <SafeMapping - at 0xe2ba324>
               decode: <function decode at 0xdfb4dbc>
               macros: <Macros - at 0xe3a7a1c>
               context: <instance - at 0xdd87d4c>
               translate: <function translate at 0xdfb4d84>
               root: <ImplicitAcquisitionWrapper Zope at 0xdfb352c>
               options: {...} (1)
               loop: {...} (0)

It seems thaat portal_state is not available as a variable as it is without five.pt

@rpatterson
Copy link
Author

Weird, when you click close, it doesn't add the comment in the comment box. At any rate, the newest release fixed this and my tests moved beyond this onto the next failure, recorded in new ticktets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant