[ckan-dev] vdm commit in new_revision
Friedrich Lindenberg
friedrich.lindenberg at okfn.org
Wed Nov 10 15:59:32 UTC 2010
Hi,
these seem to happen upon package creation with hg-based VDM but not the 0.7 release. Seems there is a new commit statement that would cause this hiccup - is there a workaround?
Fr.
Begin forwarded message:
> From: paste at eu8.okfn.org
> Date: November 10, 2010 4:44:07 PM GMT+01:00
> To: friedrich.lindenberg at okfn.org
> Subject: WebApp Error: <class 'sqlalchemy.exceptions.IntegrityError'>: (IntegrityError) null value in column "name" violates not-null constraint 'INSERT INTO package (id, name, title, version, url, author, author_email, maintainer, maintainer_email, notes, license_id, state, revision_id) VALUES (%(id)s, %(name)s, %(title)s, %(version)s, %(url)s, %(author)s, %(author_email)s, %(maintainer)s, %(maintainer_email)s, %(notes)s, %(license_id)s, %(state)s, %(revision_id)s)' {'maintainer': None, 'name': None, 'title': None, 'url': None, 'notes': None, 'author': None, 'maintainer_email': None, 'author_email': None, 'state': 'active', 'version': None, 'license_id': None, 'revision_id': '7cf1c0b1-b886-48eb-9129-c7f7cde89df4', 'id': '88e05b3a-b242-4d48-bbd1-d5e730f7563e'}
>
> URL: http://iati.ckan.net/package/new
> Module weberror.errormiddleware:162 in __call__
> >> app_iter = self.application(environ, sr_checker)
> Module beaker.middleware:73 in __call__
> >> return self.app(environ, start_response)
> Module beaker.middleware:152 in __call__
> >> return self.wrap_app(environ, session_start_response)
> Module routes.middleware:130 in __call__
> >> response = self.app(environ, start_response)
> Module pylons.wsgiapp:125 in __call__
> >> response = self.dispatch(controller, environ, start_response)
> Module pylons.wsgiapp:324 in dispatch
> >> return controller(environ, start_response)
> Module ckan.lib.base:92 in __call__
> >> return WSGIController.__call__(self, environ, start_response)
> Module pylons.controllers.core:221 in __call__
> >> response = self._dispatch_call()
> Module pylons.controllers.core:172 in _dispatch_call
> >> response = self._inspect_call(func)
> Module pylons.controllers.core:107 in _inspect_call
> >> result = self._perform_call(func, args)
> Module pylons.controllers.core:60 in _perform_call
> >> return func(**args)
> Module ckan.controllers.package:210 in new
> >> PackageSaver().commit_pkg(fs, None, None, log_message, c.author, client=c)
> Module ckan.lib.package_saver:83 in commit_pkg
> >> cls._update(fs, original_name, pkg_id, log_message, author, commit=True, client=client)
> Module ckan.lib.package_saver:101 in _update
> >> rev = model.repo.new_revision()
> Module vdm.sqlalchemy.tools:123 in new_revision
> >> SQLAlchemySession.set_revision(self.session, rev)
> Module vdm.sqlalchemy.base:45 in set_revision
> >> session.commit()
> Module sqlalchemy.orm.scoping:98 in do
> >> return getattr(self.registry(), name)(*args, **kwargs)
> Module sqlalchemy.orm.session:557 in commit
> >> self.transaction.commit()
> Module sqlalchemy.orm.session:262 in commit
> >> self._prepare_impl()
> Module sqlalchemy.orm.session:246 in _prepare_impl
> >> self.session.flush()
> Module sqlalchemy.orm.session:789 in flush
> >> self.uow.flush(self, objects)
> Module sqlalchemy.orm.unitofwork:237 in flush
> >> flush_context.execute()
> Module sqlalchemy.orm.unitofwork:449 in execute
> >> UOWExecutor().execute(self, tasks)
> Module sqlalchemy.orm.unitofwork:934 in execute
> >> self.execute_save_steps(trans, task)
> Module sqlalchemy.orm.unitofwork:949 in execute_save_steps
> >> self.save_objects(trans, task)
> Module sqlalchemy.orm.unitofwork:940 in save_objects
> >> task.mapper._save_obj(task.polymorphic_tosave_objects, trans)
> Module sqlalchemy.orm.mapper:1161 in _save_obj
> >> c = connection.execute(statement.values(value_params), params)
> Module sqlalchemy.engine.base:844 in execute
> >> return Connection.executors[c](self, object, multiparams, params)
> Module sqlalchemy.engine.base:895 in execute_clauseelement
> >> return self._execute_compiled(elem.compile(dialect=self.dialect, column_keys=keys, inline=len(params) > 1), distilled_params=params)
> Module sqlalchemy.engine.base:907 in _execute_compiled
> >> self.__execute_raw(context)
> Module sqlalchemy.engine.base:916 in __execute_raw
> >> self._cursor_execute(context.cursor, context.statement, context.parameters[0], context=context)
> Module sqlalchemy.engine.base:960 in _cursor_execute
> >> self._handle_dbapi_exception(e, statement, parameters, cursor)
> Module sqlalchemy.engine.base:942 in _handle_dbapi_exception
> >> raise exceptions.DBAPIError.instance(statement, parameters, e, connection_invalidated=is_disconnect)
> IntegrityError: (IntegrityError) null value in column "name" violates not-null constraint 'INSERT INTO package (id, name, title, version, url, author, author_email, maintainer, maintainer_email, notes, license_id, state, revision_id) VALUES (%(id)s, %(name)s, %(title)s, %(version)s, %(url)s, %(author)s, %(author_email)s, %(maintainer)s, %(maintainer_email)s, %(notes)s, %(license_id)s, %(state)s, %(revision_id)s)' {'maintainer': None, 'name': None, 'title': None, 'url': None, 'notes': None, 'author': None, 'maintainer_email': None, 'author_email': None, 'state': 'active', 'version': None, 'license_id': None, 'revision_id': '7cf1c0b1-b886-48eb-9129-c7f7cde89df4', 'id': '88e05b3a-b242-4d48-bbd1-d5e730f7563e'}
> CGI Variables
> AUTH_TYPE 'cookie'
> CONTENT_LENGTH '-1'
> CONTENT_TYPE 'application/x-www-form-urlencoded; charset="utf-8"'
> DOCUMENT_ROOT '/htdocs'
> GATEWAY_INTERFACE 'CGI/1.1'
> HTTP_ACCEPT 'application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5'
> HTTP_ACCEPT_ENCODING 'gzip'
> HTTP_ACCEPT_LANGUAGE 'en-us'
> HTTP_COOKIE 'auth_tkt="c9f27a6f754f425938c40ff3be24d2974cda9fb5testniebel!userid_type:unicode"; ckan_apikey="b595ec65-ca51-4f08-af08-fd18e2b4d344"; ckan_display_name="Dirk Niebel"; ckan_user="testniebel"; auth_tkt="c9f27a6f754f425938c40ff3be24d2974cda9fb5testniebel!userid_type:unicode"; __utma=27730403.1646893015.1262471089.1281688075.1282217004.73; __utmz=27730403.1276072596.69.19.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=http://atarax.org/citiesinfo/citiesinfo/'
> HTTP_HOST 'iati.ckan.net'
> HTTP_ORIGIN 'http://iati.ckan.net'
> HTTP_PRAGMA 'no-cache'
> HTTP_REFERER 'http://iati.ckan.net/package/new'
> HTTP_USER_AGENT 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5'
> PATH '/usr/local/bin:/usr/bin:/bin'
> PATH_INFO '/package/new'
> PATH_TRANSLATED '/home/okfn/var/srvc/iati.ckan.net/pyenv/bin/iati.ckan.net.py/package/new'
> REMOTE_ADDR '87.159.103.121'
> REMOTE_PORT '50382'
> REMOTE_USER u'testniebel'
> REMOTE_USER_DATA 'userid_type:unicode'
> REMOTE_USER_TOKENS ['']
> REQUEST_METHOD 'POST'
> REQUEST_URI '/package/new'
> SCRIPT_FILENAME '/home/okfn/var/srvc/iati.ckan.net/pyenv/bin/iati.ckan.net.py'
> SERVER_ADDR '10.227.127.100'
> SERVER_ADMIN '[no address given]'
> SERVER_NAME 'iati.ckan.net'
> SERVER_PORT '80'
> SERVER_PROTOCOL 'HTTP/1.1'
> SERVER_SIGNATURE '<address>Apache/2.2.14 (Ubuntu) Server at iati.ckan.net Port 80</address>\n'
> SERVER_SOFTWARE 'Apache/2.2.14 (Ubuntu)'
> WSGI Variables
> application <beaker.middleware.CacheMiddleware object at 0xb9462aac>
> beaker.cache <beaker.cache.CacheManager object at 0xb9462bcc>
> beaker.get_session <bound method SessionMiddleware._get_session of <beaker.middleware.SessionMiddleware object at 0xb9462acc>>
> beaker.session {'_accessed_time': 1289403840.3853159, '_creation_time': 1289403840.3853159}
> mod_wsgi.application_group 'iati.ckan.net|'
> mod_wsgi.callable_object 'application'
> mod_wsgi.listener_host ''
> mod_wsgi.listener_port '80'
> mod_wsgi.process_group ''
> mod_wsgi.reload_mechanism '0'
> mod_wsgi.script_reloading '1'
> mod_wsgi.version (2, 8)
> paste.cookies (<SimpleCookie: __utma='27730403.1646893015.1262471089.1281688075.1282217004.73' __utmz='27730403.1276072596.69.19.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=http://atarax.org/citiesinfo/citiesinfo/' auth_tkt='c9f27a6f754f425938c40ff3be24d2974cda9fb5testniebel!userid_type:unicode' ckan_apikey='b595ec65-ca51-4f08-af08-fd18e2b4d344' ckan_display_name='Dirk Niebel' ckan_user='testniebel'>, 'auth_tkt="c9f27a6f754f425938c40ff3be24d2974cda9fb5testniebel!userid_type:unicode"; ckan_apikey="b595ec65-ca51-4f08-af08-fd18e2b4d344"; ckan_display_name="Dirk Niebel"; ckan_user="testniebel"; auth_tkt="c9f27a6f754f425938c40ff3be24d2974cda9fb5testniebel!userid_type:unicode"; __utma=27730403.1646893015.1262471089.1281688075.1282217004.73; __utmz=27730403.1276072596.69.19.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=http://atarax.org/citiesinfo/citiesinfo/')
> paste.registry <paste.registry.Registry object at 0xbac0bf0c>
> paste.throw_errors True
> pylons.action_method <bound method PackageController.new of <ckan.controllers.package.PackageController object at 0xbac68d2c>>
> pylons.controller <ckan.controllers.package.PackageController object at 0xbac68d2c>
> pylons.environ_config {'session': 'beaker.session', 'cache': 'beaker.cache'}
> pylons.pylons <pylons.util.PylonsContext object at 0xbac6878c>
> pylons.routes_dict {'action': u'new', 'controller': u'package'}
> repoze.who.identity <repoze.who identity (hidden, dict-like) at 3133180348>
> repoze.who.logger <logging.Logger instance at 0xb9462c8c>
> repoze.who.plugins {'openid': <OpenIdIdentificationPlugin 3110763820>, 'auth_tkt': <AuthTktCookiePlugin 3110779020>, 'ckan.lib.authenticator:OpenIDAuthenticator': <ckan.lib.authenticator.OpenIDAuthenticator object at 0xb96abc8c>}
> routes.route <routes.route.Route object at 0xb93510ac>
> routes.url <routes.util.URLGenerator object at 0xbac686cc>
> webob._parsed_post_vars (MultiDict([('Package--name', 'test'), ('Package--title', 'Test'), ('Package--author', ''), ('Package--author_email', ''), ('Package--department', ''), ('Package--groups-new', '13697114-7cb4-4045-bf71-7751b69a64d2'), ('Package--country', ''), ('Package--donors', ''), ('Package--donors_type', ''), ('Package--donors_country', ''), ('Package--record_updated', ''), ('Package--data_updated', ''), ('Package--license_id', ''), ('Package--tags', ''), ('Package--notes', ''), ('Package--resources-0-url', ''), ('Package--resources-0-format', ''), ('Package--resources-0-description', ''), ('Package--resources-0-hash', ''), ('Package--resources-0-id', ''), ('Package--activity_period-from', ''), ('Package--activity_period-to', ''), ('Package--activity_count', ''), ('log_message', ''), ('save', 'Save')]), <FakeCGIBody at 0xbac6828c viewing MultiDict([('Pa...e')])>)
> webob._parsed_query_vars (GET([]), '')
> webob.adhoc_attrs {'errors': 'ignore', 'language': 'en-us'}
> wsgi process 'Multi process AND threads (?)'
> wsgi.file_wrapper <built-in method file_wrapper of mod_wsgi.Adapter object at 0xbada5800>
> wsgiorg.routing_args (<routes.util.URLGenerator object at 0xbac686cc>, {'action': u'new', 'controller': u'package'})
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20101110/1a4c246b/attachment.html>
More information about the ckan-dev
mailing list