Code:TypeError at /milcisgay/ 'NoneType' object is not iterable Request Method: GET Request URL: http://www.gaia-items.com/milcisgay/?id=-1 Django Version: 1.4.1 Exception Type: TypeError Exception Value: 'NoneType' object is not iterable Exception Location: /home/elistrophy/webapps/django/gaia/inventory_viewer/views.py in get_inventory_info, line 25 Python Executable: /usr/bin/python Python Version: 2.7.3 Python Path: ['/home/elistrophy/webapps/django', '/home/elistrophy/webapps/django/gaia', '/home/elistrophy/webapps/django/lib/python2.7', '/home/elistrophy/lib/python2.7/phpserialize-1.3-py2.7.egg', '/home/elistrophy/lib/python2.7', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/site-packages/PIL'] Server time: Wed, 19 Dec 2012 02:36:33 -0600 Traceback Switch to copy-and-paste view /home/elistrophy/webapps/django/lib/python2.7/django/core/handlers/base.py in get_response for middleware_method in self._view_middleware: response = middleware_method(request, callback, callback_args, callback_kwargs) if response: break if response is None: try: response = callback(request, *callback_args, **callback_kwargs) ... except Exception, e: # If the view raised an exception, run it through exception # middleware, and if the exception middleware returns a # response, use that. Otherwise, reraise the exception. for middleware_method in self._exception_middleware: response = middleware_method(request, e) ▶ Local vars /home/elistrophy/webapps/django/gaia/inventory_viewer/views.py in return_inventory ] if req.GET: id = req.GET[ 'id' ] user_info = get_user_info( id ) if user_info: inventory = get_inventory( user_info[ 'gaia_id' ] ) inventory_info = get_inventory_info( inventory ) ... return render_to_response(template, { 'user_info' : user_info, 'inventory' : inventory, 'item_info' : inventory_info, 'filter' : item_filter }, context_instance=RequestContext(req)) elif user_info is False: return render_to_response(template, { 'error' : True }, context_instance=RequestContext(req)) ▼ Local vars Variable Value req "<WSGIRequest\npath:/milcisgay/,\nGET:<QueryDict: {u'id': [u'-1']}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{'CSRF_COOKIE': 'GnYZoSmYAuzpmbYdxh7PJxkzh8ZhGauM',\n 'DOCUMENT_ROOT': '/usr/local/apache2/htdocs',\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'HTTP_ACCEPT_LANGUAGE': 'en-gb,en;q=0.5',\n 'HTTP_CONNECTION': 'close',\n 'HTTP_DNT': '1',\n 'HTTP_FORWARDED_REQUEST_URI': '/milcisgay/?id=-1',\n 'HTTP_HOST': 'www.gaia-items.com',\n 'HTTP_HTTPS': 'off',\n 'HTTP_HTTP_X_FORWARDED_PROTO': 'http',\n 'HTTP_PROXY_CONNECTION': 'keep-alive',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 Paros/3.2.13',\n 'HTTP_X_FORWARDED_FOR': '',\n 'HTTP_X_FORWARDED_HOST': 'www.gaia-items.com',\n 'HTTP_X_FORWARDED_PROTO': 'http',\n 'HTTP_X_FORWARDED_SERVER': 'www.gaia-items.com',\n 'HTTP_X_FORWARDED_SSL': 'off',\n 'PATH_INFO': u'/milcisgay/',\n 'PATH_TRANSLATED': '/home/elistrophy/webapps/django/gaia/gaia/wsgi.py/milcisgay/',\n 'QUERY_STRING': 'id=-1',\n 'REMOTE_ADDR': '127.0.0.1',\n 'REMOTE_PORT': '47791',\n 'REQUEST_METHOD': 'GET',\n 'REQUEST_URI': '/milcisgay/?id=-1',\n 'SCRIPT_FILENAME': '/home/elistrophy/webapps/django/gaia/gaia/wsgi.py',\n 'SCRIPT_NAME': u'',\n 'SERVER_ADDR': '127.0.0.1',\n 'SERVER_ADMIN': '[no address given]',\n 'SERVER_NAME': 'www.gaia-items.com',\n 'SERVER_PORT': '80',\n 'SERVER_PROTOCOL': 'HTTP/1.0',\n 'SERVER_SIGNATURE': '',\n 'SERVER_SOFTWARE': 'Apache/2.2.17 (Unix) mod_wsgi/3.4 Python/2.7.3',\n 'mod_wsgi.application_group': 'web343.webfaction.com|',\n 'mod_wsgi.callable_object': 'application',\n 'mod_wsgi.enable_sendfile': '0',\n 'mod_wsgi.handler_script': '',\n 'mod_wsgi.input_chunked': '0',\n 'mod_wsgi.listener_host': '',\n 'mod_wsgi.listener_port': '10700',\n 'mod_wsgi.process_group': 'django',\n 'mod_wsgi.queue_start': '1355906193061128',\n 'mod_wsgi.request_handler': 'wsgi-script',\n 'mod_wsgi.script_reloading': '1',\n 'mod_wsgi.version': (3, 4),\n 'wsgi.errors': <mod_wsgi.Log object at 0x7f5d681b4bf0>,\n 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f5d6cbaba08>,\n 'wsgi.input': <mod_wsgi.Input object at 0x7f5d681b46b0>,\n 'wsgi.multiprocess': True,\n 'wsgi.multithread': True,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>" id u'-1' user_info {u'avatar': u'ava/1f/94/567c1bc33b941f_flip.png?t=1148524313_3.00_00', u'gaia_id': -1855734, u'room_id': 1, u'server_id': -1, u'session_id': -1, u'sushi_id': -1, u'towns_address': 0, u'user_active': 1, u'user_level': 0, u'user_pms': 0, u'username': u'guest1855734'} inventory [[None]] template 'inventory_viewer/inventory_viewer.html' item_filter [1404, 1425, 1426, 1427, 1433, 1434, 1435, 1521, 1522, 1523, 1537, 1538, 1539, 1585, 1586, 1587, 1667, 1708, 1709, 1142, 1143, 1146, 1718, 2315, 2316, 1719, 2393, 1720, 2443, 2444] /home/elistrophy/webapps/django/gaia/inventory_viewer/views.py in get_inventory_info return user_info[0] def get_inventory( user_id ): inventory = gsi( [ { 120 : [ user_id, '4ebf46b03a59c0601c2e1ddea330db25', 'true'] } ] ) return filter(None, inventory) def get_inventory_info( inventory ): item_ids = [ { 712 : [ item[ 'item_id' ] ] } for item in inventory[ 0 ][ 0 ] ] ... item_details = gsi( item_ids ) return filter( None, item_details ) def return_inventory( req ): template = 'inventory_viewer/inventory_viewer.html' item_filter = [ ▼ Local vars Variable Value inventory [[None]] Request information GET Variable Value id u'-1' POST No POST data FILES No FILES data COOKIES No cookie data META Variable Value mod_wsgi.listener_port '10700' HTTP_X_FORWARDED_SERVER 'www.gaia-items.com' HTTP_ACCEPT_LANGUAGE 'en-gb,en;q=0.5' SERVER_PROTOCOL 'HTTP/1.0' SERVER_SOFTWARE 'Apache/2.2.17 (Unix) mod_wsgi/3.4 Python/2.7.3' SCRIPT_NAME u'' mod_wsgi.enable_sendfile '0' mod_wsgi.handler_script '' SERVER_SIGNATURE '' REQUEST_METHOD 'GET' HTTP_HTTPS 'off' PATH_INFO u'/milcisgay/' HTTP_X_FORWARDED_SSL 'off' QUERY_STRING 'id=-1' HTTP_USER_AGENT 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 Paros/3.2.13' HTTP_CONNECTION 'close' SERVER_NAME 'www.gaia-items.com' REMOTE_ADDR '127.0.0.1' mod_wsgi.queue_start '1355906193061128' mod_wsgi.request_handler 'wsgi-script' HTTP_HTTP_X_FORWARDED_PROTO 'http' wsgi.url_scheme 'http' PATH_TRANSLATED '/home/elistrophy/webapps/django/gaia/gaia/wsgi.py/milcisgay/' SERVER_PORT '80' wsgi.multiprocess True mod_wsgi.input_chunked '0' SERVER_ADDR '127.0.0.1' DOCUMENT_ROOT '/usr/local/apache2/htdocs' mod_wsgi.process_group 'django' HTTP_X_FORWARDED_PROTO 'http' SCRIPT_FILENAME '/home/elistrophy/webapps/django/gaia/gaia/wsgi.py' SERVER_ADMIN '[no address given]' wsgi.input <mod_wsgi.Input object at 0x7f5d681b46b0> HTTP_DNT '1' HTTP_HOST 'www.gaia-items.com' wsgi.multithread True mod_wsgi.callable_object 'application' REQUEST_URI '/milcisgay/?id=-1' HTTP_ACCEPT 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' mod_wsgi.listener_host '' HTTP_FORWARDED_REQUEST_URI '/milcisgay/?id=-1' wsgi.version (1, 0) GATEWAY_INTERFACE 'CGI/1.1' HTTP_X_FORWARDED_FOR '' HTTP_PROXY_CONNECTION 'keep-alive' wsgi.errors <mod_wsgi.Log object at 0x7f5d681b4bf0> REMOTE_PORT '47791' HTTP_X_FORWARDED_HOST 'www.gaia-items.com' mod_wsgi.version (3, 4) wsgi.run_once False mod_wsgi.application_group 'web343.webfaction.com|' mod_wsgi.script_reloading '1' wsgi.file_wrapper '' CSRF_COOKIE 'GnYZoSmYAuzpmbYdxh7PJxkzh8ZhGauM' Settings Using settings module gaia.settings Setting Value USE_L10N True USE_THOUSAND_SEPARATOR False CSRF_COOKIE_SECURE False LANGUAGE_CODE 'en-us' ROOT_URLCONF 'gaia.urls' MANAGERS () DEFAULT_CHARSET 'utf-8' STATIC_ROOT '/home/elistrophy/webapps/static/' MESSAGE_STORAGE 'django.contrib.messages.storage.fallback.FallbackStorage' EMAIL_SUBJECT_PREFIX '[Django] ' FILE_UPLOAD_PERMISSIONS None URL_VALIDATOR_USER_AGENT 'Django/1.4.1 (https://www.djangoproject.com)' STATICFILES_FINDERS ('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder') SESSION_COOKIE_DOMAIN None SESSION_COOKIE_NAME 'sessionid' ADMIN_FOR () TIME_INPUT_FORMATS ('%H:%M:%S', '%H:%M') DATABASES {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2', 'HOST': '', 'NAME': 'elistrophy', 'OPTIONS': {}, 'PASSWORD': u'********************', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': 'UTC', 'USER': 'elistrophy'}} SERVER_EMAIL 'root@localhost' FILE_UPLOAD_HANDLERS ('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler') DEFAULT_CONTENT_TYPE 'text/html' APPEND_SLASH True FIRST_DAY_OF_WEEK 0 DATABASE_ROUTERS [] YEAR_MONTH_FORMAT 'F Y' STATICFILES_STORAGE 'django.contrib.staticfiles.storage.StaticFilesStorage' CACHES {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'LOCATION': ''}} SESSION_COOKIE_PATH '/' USE_X_FORWARDED_HOST False MIDDLEWARE_CLASSES ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') USE_I18N True THOUSAND_SEPARATOR ',' SECRET_KEY u'********************' LANGUAGE_COOKIE_NAME 'django_language' DEFAULT_INDEX_TABLESPACE '' TRANSACTIONS_MANAGED False LOGGING_CONFIG 'django.utils.log.dictConfig' SEND_BROKEN_LINK_EMAILS False TEMPLATE_LOADERS ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader') WSGI_APPLICATION 'gaia.wsgi.application' TEMPLATE_DEBUG True X_FRAME_OPTIONS 'SAMEORIGIN' AUTHENTICATION_BACKENDS ('django.contrib.auth.backends.ModelBackend',) FORCE_SCRIPT_NAME None CACHE_BACKEND 'locmem://' SIGNING_BACKEND 'django.core.signing.TimestampSigner' SESSION_COOKIE_SECURE False CSRF_COOKIE_DOMAIN None FILE_CHARSET 'utf-8' DEBUG True SESSION_FILE_PATH None DEFAULT_FILE_STORAGE 'django.core.files.storage.FileSystemStorage' INSTALLED_APPS ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'django.contrib.admindocs', 'inventory_viewer', 'main', 'registrator') LANGUAGES (('ar', 'Arabic'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('bn', 'Bengali'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy-nl', 'Frisian'), ('ga', 'Irish'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('id', 'Indonesian'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('nb', 'Norwegian Bokmal'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese')) COMMENTS_ALLOW_PROFANITIES False STATICFILES_DIRS () PREPEND_WWW False SECURE_PROXY_SSL_HEADER None SESSION_COOKIE_HTTPONLY True DEBUG_PROPAGATE_EXCEPTIONS False MONTH_DAY_FORMAT 'F j' LOGIN_URL '/accounts/login/' SESSION_EXPIRE_AT_BROWSER_CLOSE False TIME_FORMAT 'P' DATE_INPUT_FORMATS ('%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y') CSRF_COOKIE_NAME 'csrftoken' EMAIL_HOST_PASSWORD u'********************' PASSWORD_RESET_TIMEOUT_DAYS u'********************' CACHE_MIDDLEWARE_ALIAS 'default' SESSION_SAVE_EVERY_REQUEST False NUMBER_GROUPING 0 SESSION_ENGINE 'django.contrib.sessions.backends.db' CSRF_FAILURE_VIEW 'django.views.csrf.csrf_failure' CSRF_COOKIE_PATH '/' LOGIN_REDIRECT_URL '/accounts/profile/' LOGGING {'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'filters': ['require_debug_false'], 'level': 'ERROR'}}, 'loggers': {'django.request': {'handlers': ['mail_admins'], 'level': 'ERROR', 'propagate': True}}, 'version': 1} IGNORABLE_404_URLS () LOCALE_PATHS () TEMPLATE_STRING_IF_INVALID '' LOGOUT_URL '/accounts/logout/' EMAIL_USE_TLS False FIXTURE_DIRS () EMAIL_HOST 'localhost' DATE_FORMAT 'N j, Y' MEDIA_ROOT '' DEFAULT_EXCEPTION_REPORTER_FILTER 'django.views.debug.SafeExceptionReporterFilter' ADMINS () FORMAT_MODULE_PATH None DEFAULT_FROM_EMAIL 'webmaster@localhost' MEDIA_URL '' DATETIME_FORMAT 'N j, Y, P' TEMPLATE_DIRS ('/home/elistrophy/webapps/django/gaia/templates/',) SITE_ID 1 DISALLOWED_USER_AGENTS () ALLOWED_INCLUDE_ROOTS () DECIMAL_SEPARATOR '.' SHORT_DATE_FORMAT 'm/d/Y' TEST_RUNNER 'django.test.simple.DjangoTestSuiteRunner' CACHE_MIDDLEWARE_KEY_PREFIX u'********************' TIME_ZONE 'America/Chicago' FILE_UPLOAD_MAX_MEMORY_SIZE 2621440 EMAIL_BACKEND 'django.core.mail.backends.smtp.EmailBackend' DEFAULT_TABLESPACE '' TEMPLATE_CONTEXT_PROCESSORS ('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'django.core.context_processors.tz', 'django.contrib.messages.context_processors.messages') SESSION_COOKIE_AGE 1209600 SETTINGS_MODULE 'gaia.settings' USE_ETAGS False LANGUAGES_BIDI ('he', 'ar', 'fa') FILE_UPLOAD_TEMP_DIR None INTERNAL_IPS () STATIC_URL '/static/' EMAIL_PORT 25 USE_TZ True SHORT_DATETIME_FORMAT 'm/d/Y P' PASSWORD_HASHERS u'********************' ABSOLUTE_URL_OVERRIDES {} CACHE_MIDDLEWARE_SECONDS 600 DATETIME_INPUT_FORMATS ('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y') EMAIL_HOST_USER '' PROFANITIES_LIST u'********************' You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.
Post this again and I'm banning you.