URL: http://127.0.0.1:8091/admin/edit_user/?id=4da55c1016d83479fd000008 Module weberror.evalexception:431 in respond view << try: __traceback_supplement__ = errormiddleware.Supplement, self, environ app_iter = self.application(environ, detect_start_response) # Don't create a list from a paste.fileapp object >> app_iter = self.application(environ, detect_start_response) Module repoze.tm:19 in __call__ view << return start_response(status, headers, exc_info) try: result = self.application(environ, save_status_and_headers) except: self.abort() >> result = self.application(environ, save_status_and_headers) Module repoze.who.middleware:107 in __call__ view << wrapper = StartResponseWrapper(start_response) app_iter = app(environ, wrapper.wrap_start_response) # The challenge decider almost(?) always needs information from the >> app_iter = app(environ, wrapper.wrap_start_response) Module tw2.core.middleware:150 in __call__ view << else: if self.app: resp = req.get_response(self.app) else: resp = wo.Response(status="404 Not Found") >> resp = req.get_response(self.app) Module webob.request:935 in get_response view << else: status, headers, app_iter = self.call_application( application, catch_exc_info=False) return self.ResponseClass( status=status, headerlist=list(headers), app_iter=app_iter, >> application, catch_exc_info=False) Module webob.request:904 in call_application view << captured[:] = [status, headers, exc_info] return output.append app_iter = application(self.environ, start_response) if output or not captured: try: >> app_iter = application(self.environ, start_response) Module tw.core.middleware:36 in __call__ view << def __call__(self, environ, start_response): return self.wsgi_app(environ, start_response) def wsgi_app(self, environ, start_response): >> return self.wsgi_app(environ, start_response) Module tw.core.middleware:59 in wsgi_app view << else: # Pass request downstream resp = req.get_response(self.application) return resp(environ, start_response) finally: >> resp = req.get_response(self.application) Module webob.request:935 in get_response view << else: status, headers, app_iter = self.call_application( application, catch_exc_info=False) return self.ResponseClass( status=status, headerlist=list(headers), app_iter=app_iter, >> application, catch_exc_info=False) Module webob.request:904 in call_application view << captured[:] = [status, headers, exc_info] return output.append app_iter = application(self.environ, start_response) if output or not captured: try: >> app_iter = application(self.environ, start_response) Module tw.core.resource_injector:67 in _injector view << def _injector(environ, start_response): req = Request(environ) resp = req.get_response(app) content_type = resp.headers.get('Content-Type','text/plain').lower() if 'html' in content_type: >> resp = req.get_response(app) Module webob.request:935 in get_response view << else: status, headers, app_iter = self.call_application( application, catch_exc_info=False) return self.ResponseClass( status=status, headerlist=list(headers), app_iter=app_iter, >> application, catch_exc_info=False) Module webob.request:904 in call_application view << captured[:] = [status, headers, exc_info] return output.append app_iter = application(self.environ, start_response) if output or not captured: try: >> app_iter = application(self.environ, start_response) Module beaker.middleware:73 in __call__ view << self.cache_manager) environ[self.environ_key] = self.cache_manager return self.app(environ, start_response) >> return self.app(environ, start_response) Module beaker.middleware:152 in __call__ view << headers.append(('Set-cookie', cookie)) return start_response(status, headers, exc_info) return self.wrap_app(environ, session_start_response) def _get_session(self): >> return self.wrap_app(environ, session_start_response) Module routes.middleware:131 in __call__ view << r'\1', oldpath) response = self.app(environ, start_response) # Wrapped in try as in rare cases the attribute will be gone already >> response = self.app(environ, start_response) Module pylons.wsgiapp:124 in __call__ view << controller = self.resolve(environ, start_response) response = self.dispatch(controller, environ, start_response) if 'paste.testing_variables' in environ and hasattr(response, >> response = self.dispatch(controller, environ, start_response) Module pylons.wsgiapp:327 in dispatch view << if log_debug: log.debug("Calling controller class with WSGI interface") return controller(environ, start_response) def load_test_env(self, environ): >> return controller(environ, start_response) Module glaucoma.lib.base:32 in __call__ view << request.identity = request.environ.get('repoze.who.identity') tmpl_context.identity = request.identity return TGController.__call__(self, environ, start_response) >> return TGController.__call__(self, environ, start_response) Module pylons.controllers.core:225 in __call__ view << return response(environ, self.start_response) response = self._dispatch_call() if not start_response_called: self.start_response = start_response >> response = self._dispatch_call() Module pylons.controllers.core:176 in _dispatch_call view << req.environ['pylons.action_method'] = func response = self._inspect_call(func) else: if log_debug: >> response = self._inspect_call(func) Module pylons.controllers.core:108 in _inspect_call view << func.__name__, args) try: result = self._perform_call(func, args) except HTTPException, httpe: if log_debug: >> result = self._perform_call(func, args) Module tg.controllers.dispatcher:254 in _perform_call view << self._setup_wsgi_script_name(url_path, remainder, params) r = self._call(func, params, remainder=remainder) if hasattr(controller, '__after__'): >> r = self._call(func, params, remainder=remainder) Module tg.controllers.decoratedcontroller:98 in _call view << # Validate user input params = self._perform_validate(controller, validate_params) pylons.tmpl_context.form_values = params >> params = self._perform_validate(controller, validate_params) Module tg.controllers.decoratedcontroller:206 in _perform_validate view << elif hasattr(validation.validators, 'validate'): # An object with a "validate" method - call it with the parameters new_params = validation.validators.validate(params, state) # Theoretically this should not happen... >> new_params = validation.validators.validate(params, state) Module tw2.core.widgets:307 in validate view << # Key the validated widget by class id core.request_local()['validated_widget'] = ins return ins._validate(value) @vd.catch_errors >> return ins._validate(value) Module ?:2 in _validate view Module tw2.core.validation:60 in catch_errors view << def catch_errors(fn, self, *args, **kw): try: d = fn(self, *args, **kw) return d except catch, e: >> d = fn(self, *args, **kw) Module tw2.core.widgets:698 in _validate view << self._validated = True try: return self.child._validate(value, state) except vd.ValidationError, e: raise vd.ValidationError('childerror', self.validator, self) >> return self.child._validate(value, state) Module ?:2 in _validate view Module tw2.core.validation:60 in catch_errors view << def catch_errors(fn, self, *args, **kw): try: d = fn(self, *args, **kw) return d except catch, e: >> d = fn(self, *args, **kw) Module tw2.core.widgets:461 in _validate view << try: data = self.validator.to_python(data) self.validator.validate_python(data, state) except catch, e: error_dict = getattr(e, 'error_dict', {}) >> self.validator.validate_python(data, state) Module glaucoma.forms.admin:104 in validate_python view << """ def validate_python(self, value, state=None): u = User.by_email_address(value.get('email_address')) if u and u.user_name != value.get('user_name'): raise fe.Invalid('', value, state, error_dict={'email_address': 'Email exists'}) >> u = User.by_email_address(value.get('email_address')) Module glaucoma.model.auth:209 in by_email_address view << def by_email_address(cls, email): """Return the user object whose email address is ``email``.""" return cls.m.get(email_address=email) @classmethod >> return cls.m.get(email_address=email) Module ming.base:107 in get view << get(source='sf.net',shortname='foo') """ return self.session.get(self.cls, **kwargs) def find(self, *args, **kwargs): >> return self.session.get(self.cls, **kwargs) Module ming.session:34 in get view << def get(self, cls, **kwargs): bson = self._impl(cls).find_one(kwargs) if bson is None: return None return cls.make(bson) >> bson = self._impl(cls).find_one(kwargs) Module pymongo.collection:469 in find_one view << spec_or_id = {"_id": spec_or_id} for result in self.find(spec_or_id, *args, **kwargs).limit(-1): return result return None >> for result in self.find(spec_or_id, *args, **kwargs).limit(-1): Module pymongo.cursor:601 in next view << raise StopIteration db = self.__collection.database if len(self.__data) or self._refresh(): next = db._fix_outgoing(self.__data.pop(0), self.__collection) else: >> if len(self.__data) or self._refresh(): Module pymongo.cursor:564 in _refresh view << self.__collection.full_name, self.__skip, self.__limit, self.__query_spec(), self.__fields)) if not self.__id: self.__killed = True >> self.__query_spec(), self.__fields)) Module pymongo.message:113 in query view << data += struct.pack("> data += bson.BSON.encode(query) Module bson:462 in encode check_keys False cls document SON([('$query', {'email_address': })]) view << .. versionadded:: 1.9 """ return cls(_dict_to_bson(document, check_keys)) def to_dict(self, as_class=dict, tz_aware=False): >> return cls(_dict_to_bson(document, check_keys)) InvalidDocument: Cannot encode object: