621: TypeError at dashboard/ -- 'NoneType' object is not iterable

sam****@gmai***** (Google Code) (Is this you? Claim this profile.)
Aug. 28, 2008
What's the URL of the page containing the problem?

Not a public server, behind firewall

What steps will reproduce the problem?
1. Install on Ubuntu 8.04 according to install page
2. check out latest SVN (rev 1466)
3. configure apache as below
4. browse to URL

What is the expected output? What do you see instead?

Expected to see reviewboard running. See the error instead.


What operating system are you using? What browser?

Ubuntu 8.04, firefox 3


Please provide any additional information below.
 
Error output

TypeError at dashboard/

'NoneType' object is not iterable

Request Method: 	GET
Request URL: 	http://myserverdashboard/
Exception Type: 	TypeError
Exception Value: 	

'NoneType' object is not iterable

Exception Location: 
/usr/lib/python2.5/site-packages/django/core/handlers/base.py in
get_response, line 77
Python Executable: 	/usr/bin/python
Python Version: 	2.5.1
Python Path: 	['@djangodir@', '/home/review', '/home/review/reviewboard',
'@pythondir@/djblets', '/home/review', '/usr/lib/python25.zip',
'/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2',
'/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload',
'/usr/local/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages/Numeric',
'/usr/lib/python2.5/site-packages/PIL',
'/usr/lib/python2.5/site-packages/gst-0.10',
'/var/lib/python-support/python2.5',
'/usr/lib/python2.5/site-packages/gtk-2.0',
'/var/lib/python-support/python2.5/gtk-2.0']
Server time: 	Thu, 28 Aug 2008 14:05:11 -0700
Traceback Switch to copy-and-paste view

    * /usr/lib/python2.5/site-packages/django/core/handlers/base.py in
get_response
        70.
        71. # Get urlconf from request object, if available. Otherwise use
default.
        72. urlconf = getattr(request, "urlconf", settings.ROOT_URLCONF)
        73.
        74. resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
        75. try:
        76. callback, callback_args, callback_kwargs = resolver.resolve(
        77. request.path_info) ...
        78.
        79. # Apply view middleware
        80. for middleware_method in self._view_middleware:
        81. response = middleware_method(request, callback, callback_args,
callback_kwargs)
        82. if response:
        83. return response
      ▶ Local vars
#1 sam****@gmai***** (Google Code) (Is this you? Claim this profile.)
Oops, forgot to post my apache config


<VirtualHost *>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www/reviews/htdocs

        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
                # This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                #RedirectMatch ^/$ /apache2-default/
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
        ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

    <Location "/">
        PythonPath "['@djangodir@'] + ['/home/review'] + ['/home/review/reviewboard']
+ ['@pythondir@/djblets'] + sys.path"
        SetHandler python-program
        PythonHandler django.core.handlers.modpython
        SetEnv DJANGO_SETTINGS_MODULE reviewboard.settings
        PythonOption django.root /
        PythonDebug On
        PythonAutoReload Off
    </Location>

    # Serve static media without running it through mod_python
    # (overrides the above)
    <Location "/media">
        SetHandler None
    </Location>
    <Location "/errordocs">
        SetHandler None
    </Location>

    Alias /media /home/review/reviewboard/htdocs/media
    Alias /errordocs /home/review/reviewboard/htdocs/errordocs
</VirtualHost>
#2 sam****@gmai***** (Google Code) (Is this you? Claim this profile.)
Solved the issue... if you are posting your reviews at WWWROOT (not a subdir), you
should not set a django.root to /. Apache config should look like

<Location "/">
        PythonPath "['@djangodir@'] + ['/home/review'] + ['/home/review/reviewboard']
+ ['@pythondir@/djblets'] + sys.path"
        SetHandler python-program
        PythonHandler django.core.handlers.modpython
        SetEnv DJANGO_SETTINGS_MODULE reviewboard.settings
        PythonDebug On
        PythonAutoReload Off
    </Location>
 
david
#3 david
  • +UserError