Use of unrestrictedTraverse

I need to know the exact use of unrestrictedTraverse().From the docs what I understood is ,
It will check for the permissions on a content for the particular user and return all the objects irrespective of the roles.

I have used it in the following code,

		for brain in stories:


but I am recieving the following error:

Traceback (innermost last):

Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module plone.autoform.view, line 47, in __call__
Module plone.autoform.view, line 38, in render
Module Products.Five.browser.pagetemplatefile, line 125, in __call__
Module Products.Five.browser.pagetemplatefile, line 59, in __call__
Module zope.pagetemplate.pagetemplate, line 132, in pt_render
Module, line 93, in __call__
Module, line 163, in render
Module chameleon.zpt.template, line 261, in render
Module chameleon.template, line 171, in render
Module, line 590, in render
Module, line 1223, in render_master
Module, line 420, in render_content
Module, line 279, in __fill_content_core
Module chameleon.tal, line 471, in __call__
Module plonexp.leocorn.browser.story, line 17, in storyList
Module OFS.Traversable, line 165, in unrestrictedTraverse
IndexError: list index out of range

I need the list of stories irrespective of the user roles and access.

Kindly help me

Read the documentation instead of guessing API calls.

clearly tells you that you need to pass in a path and not a content object.


makes zero sense. Traversing is about why pass a full object here?

Obviously you only need the object that is related to the brain which is what brain.getObject() is already doing. So why do you want to traverse into something? And in particular keep your fingers away from unrestrictedTraverse() - you usually never needs that API unless you know what you are doing (which is not the case here).

Can you stop being rude?

Relax and chill

There is little point in saying it again as you've had it pointed out many a time.


At my estimate I would say that for every 2 people you help with your quick and helpful responses you probably chase away another 1 person who didn't expect to spoken to in what most people would interpret as a rude manner. Chase away as in ditch the technology, community and are never seen from again.
On balance it would be better to answer nothing at all for that 1 in 3 case IMO than write something that could be interpreted as insulting and aggressive (no matter how much you feel it's the truth). That would at least give time for someone with manners to answer with the same information and make everyones day a little lighter. If someone new seems stupid to you, just don't respond. Please.

Again, I take the freedom to express my feelings if someone is notoriously ignorant, arrogant and death on recommendations and answers.

no one is denying you have that freedom.
Just pointing out it hurts the community for which you currently invest time and energy in and I'm guessing the health of said community might impact your income at some point. So seems kind of an ignorant and arrogant thing to be doing IMO.