Intermittent errors with BrowserModule

169 views
Skip to first unread message

Filipe Correia

unread,
Dec 30, 2012, 11:59:56 AM12/30/12
to trac-...@googlegroups.com
Hello all,

I've setup two new trac environments using Trac 1.0. But this error started appearing intermittently (when it does, the "Browse source" option doesn't show on the main menu):

Warning: Error with navigation contributor "BrowserModule"

Any idea of what might be happening? 
Not sure if it's relevant but I'm using the same subversion repo for both environments.

Checking Trac's log file revealed some more info, but doesn't really help me get to the bottom of it:

"Trac[chrome] ERROR:  Error with navigation contributor BrowserModule: RuntimeError: instance.__dict__ not accessible in restricted mode"

What is "restricted mode" all about? :\

Thanks!
Filipe


Alex Willmer

unread,
Dec 31, 2012, 5:29:36 AM12/31/12
to Trac Users
On Dec 30, 4:59 pm, Filipe Correia <fcorr...@gmail.com> wrote:
> Checking Trac's log file revealed some more info, but doesn't really help
> me get to the bottom of it:
>
> "Trac[chrome] ERROR:  Error with navigation contributor BrowserModule:
> RuntimeError: instance.__dict__ not accessible in restricted mode"
>
> What is "restricted mode" all about? :\

It is a known problem to do with interactions between the svn bindings
and mod_python or mod_wsgi, see http://trac.edgewall.org/wiki/TracSubversion#instance-dict-restricted-mode
for details and the workaround.

Regards, Alex

Filipe Correia

unread,
Dec 31, 2012, 7:34:17 AM12/31/12
to trac-...@googlegroups.com
Hi,

On Mon, Dec 31, 2012 at 10:29 AM, Alex Willmer <al...@moreati.org.uk> wrote:
> On Dec 30, 4:59 pm, Filipe Correia <fcorr...@gmail.com> wrote:
>> "Trac[chrome] ERROR: Error with navigation contributor BrowserModule:
>> RuntimeError: instance.__dict__ not accessible in restricted mode"
>
> It is a known problem to do with interactions between the svn bindings
> and mod_python or mod_wsgi, see http://trac.edgewall.org/wiki/TracSubversion#instance-dict-restricted-mode
> for details and the workaround.

Thank you Alex. I've double checked, but my config seems to be ok...

I'm using mod_wsgi.
So, I've deployed using "trac-admin <env> deploy" as instructed here:
http://trac.edgewall.org/wiki/TracInstall#cgi-bin

And then created my own apache config file, like the example given here:
http://trac.edgewall.org/wiki/TracModWSGI#Mappingrequeststothescript

The only difference to the workaround is that i'm using the directive
<Directory> instead of a <Location> (like the second link above
suggests)... I doubt it has any influence, but I couldn't figure out
how to switch to a <Location> using a wsgi script, so I couldn't
really confirm it yet.

Any more ideas of what may be going wrong?

Thanks,
Filipe

Filipe Correia

unread,
Jan 16, 2013, 3:12:51 PM1/16/13
to Trac Users
Hello,

Any additional suggestions? :(

What I've tried so far:
* Using the workaround documented here:
http://trac.edgewall.org/wiki/TracSubversion#instance-dict-restricted-mode
* I was using the same svn repository for both trac environments, but
now I've changed to two different ones
* I made sure I was using the recommended configuration for mod_wsgi:
http://trac.edgewall.org/wiki/TracModWSGI#Mappingrequeststothescript

The "Browse Source" option would come really handy... But disabling
it seems like the only way to avoid this error message.


Thanks,
Filipe





On Dec 31 2012, 12:34 pm, Filipe Correia <fcorr...@gmail.com> wrote:
> Hi,
>
> On Mon, Dec 31, 2012 at 10:29 AM, Alex Willmer <a...@moreati.org.uk> wrote:
> > On Dec 30, 4:59 pm, Filipe Correia <fcorr...@gmail.com> wrote:
> >> "Trac[chrome] ERROR:  Error with navigation contributor BrowserModule:
> >> RuntimeError: instance.__dict__ not accessible in restricted mode"
>
> > It is a known problem to do with interactions between the svn bindings
> > and mod_python or mod_wsgi, seehttp://trac.edgewall.org/wiki/TracSubversion#instance-dict-restricted...
Reply all
Reply to author
Forward
0 new messages