Last active
January 30, 2019 19:05
-
-
Save boykoc/65939ada7f05b8227267f76a1252b36f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nosetests --ckan --with-pylons=test-core.ini ckan ckanext | |
.....EE.............................../usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py:2181: SAWarning: Usage of the 'related attribute set' operation is not currently supported within the execution stage of the flush process. Results may not be consistent. Consider using alternative event listeners or connection-level operations instead. | |
% method) | |
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................../usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/sql/compiler.py:624: SAWarning: Can't resolve label reference 'total DESC'; converting to text() (this warning may be suppressed after 10 occurrences) | |
util.ellipses_string(element.element)) | |
..............................................................EE.EEE....E.EEE..EE....E............................EE.EEEEEEEE.........................................................S...........S................................................................................................................................................................................................................................................................................................S...........................................DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. | |
.........................................................................................................................Error: you need to specify the user name. | |
....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ | |
====================================================================== | |
ERROR: ckan.tests.config.test_environment.TestUpdateConfig.test_update_config_db_url_precedence | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/config/test_environment.py", line 82, in test_update_config_db_url_precedence | |
p.load() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/plugins/core.py", line 168, in load | |
plugins_update() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/plugins/core.py", line 122, in plugins_update | |
environment.update_config() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/config/environment.py", line 295, in update_config | |
model.init_model(engine) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/model/__init__.py", line 160, in init_model | |
version_table = Table('migrate_version', meta.metadata, autoload=True) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 439, in __new__ | |
metadata._remove_table(name, schema) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__ | |
compat.reraise(exc_type, exc_value, exc_tb) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 434, in __new__ | |
table._init(name, metadata, *args, **kw) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 514, in _init | |
include_columns, _extend_on=_extend_on) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 540, in _autoload | |
_extend_on=_extend_on | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2044, in run_callable | |
with self.contextual_connect() as conn: | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2112, in contextual_connect | |
self._wrap_pool_connect(self.pool.connect, None), | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2151, in _wrap_pool_connect | |
e, dialect, self) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1465, in _handle_dbapi_exception_noconnection | |
exc_info | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2147, in _wrap_pool_connect | |
return fn() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 387, in connect | |
return _ConnectionFairy._checkout(self) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 766, in _checkout | |
fairy = _ConnectionRecord.checkout(pool) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 516, in checkout | |
rec = pool._do_get() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 1138, in _do_get | |
self._dec_overflow() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__ | |
compat.reraise(exc_type, exc_value, exc_tb) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 1135, in _do_get | |
return self._create_connection() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 333, in _create_connection | |
return _ConnectionRecord(self) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 461, in __init__ | |
self.__connect(first_connect_check=True) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 651, in __connect | |
connection = pool._invoke_creator(self) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 105, in connect | |
return dialect.connect(*cargs, **cparams) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 393, in connect | |
return self.dbapi.connect(*cargs, **cparams) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/psycopg2/__init__.py", line 130, in connect | |
conn = _connect(dsn, connection_factory=connection_factory, **kwasync) | |
OperationalError: (psycopg2.OperationalError) could not translate host name "mynewsqlurl" to address: Name or service not known | |
-------------------- >> begin captured logging << -------------------- | |
ckan.config.environment: INFO: Loading static files from public | |
ckan.config.environment: INFO: Loading templates from /home/cody/ckan/lib/default/src/ckan/ckan/templates | |
ckan.config.environment: INFO: Loading templates from /home/cody/ckan/lib/default/src/ckan/ckan/templates | |
ckan.config.environment: WARNING: Setting CKAN_DB as an env var is deprecated and will be removed in a future release. Use CKAN_SQLALCHEMY_URL instead. | |
ckan.config.environment: INFO: Loading templates from /home/cody/ckan/lib/default/src/ckan/ckan/templates | |
--------------------- >> end captured logging << --------------------- | |
====================================================================== | |
ERROR: ckan.tests.config.test_environment.TestUpdateConfig.test_update_config_env_vars | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/config/test_environment.py", line 60, in test_update_config_env_vars | |
self._setup_env_vars() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/config/test_environment.py", line 42, in _setup_env_vars | |
p.load() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/plugins/core.py", line 168, in load | |
plugins_update() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/plugins/core.py", line 122, in plugins_update | |
environment.update_config() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/config/environment.py", line 295, in update_config | |
model.init_model(engine) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/model/__init__.py", line 160, in init_model | |
version_table = Table('migrate_version', meta.metadata, autoload=True) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 439, in __new__ | |
metadata._remove_table(name, schema) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__ | |
compat.reraise(exc_type, exc_value, exc_tb) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 434, in __new__ | |
table._init(name, metadata, *args, **kw) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 514, in _init | |
include_columns, _extend_on=_extend_on) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 540, in _autoload | |
_extend_on=_extend_on | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2044, in run_callable | |
with self.contextual_connect() as conn: | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2112, in contextual_connect | |
self._wrap_pool_connect(self.pool.connect, None), | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2151, in _wrap_pool_connect | |
e, dialect, self) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1465, in _handle_dbapi_exception_noconnection | |
exc_info | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2147, in _wrap_pool_connect | |
return fn() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 387, in connect | |
return _ConnectionFairy._checkout(self) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 766, in _checkout | |
fairy = _ConnectionRecord.checkout(pool) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 516, in checkout | |
rec = pool._do_get() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 1138, in _do_get | |
self._dec_overflow() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__ | |
compat.reraise(exc_type, exc_value, exc_tb) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 1135, in _do_get | |
return self._create_connection() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 333, in _create_connection | |
return _ConnectionRecord(self) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 461, in __init__ | |
self.__connect(first_connect_check=True) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/pool.py", line 651, in __connect | |
connection = pool._invoke_creator(self) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 105, in connect | |
return dialect.connect(*cargs, **cparams) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 393, in connect | |
return self.dbapi.connect(*cargs, **cparams) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/psycopg2/__init__.py", line 130, in connect | |
conn = _connect(dsn, connection_factory=connection_factory, **kwasync) | |
OperationalError: (psycopg2.OperationalError) could not translate host name "mynewsqlurl" to address: Name or service not known | |
-------------------- >> begin captured logging << -------------------- | |
ckan.config.environment: WARNING: Setting CKAN_DB as an env var is deprecated and will be removed in a future release. Use CKAN_SQLALCHEMY_URL instead. | |
ckan.lib.search.common: ERROR: Failed to connect to server at 'http://mynewsolrurl/solr/select/?q=%2A%3A%2A&rows=1&wt=json', are you sure that URL is correct? Checking it in a browser might help: HTTPConnectionPool(host='mynewsolrurl', port=80): Max retries exceeded with url: /solr/select/?q=%2A%3A%2A&rows=1&wt=json (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7a8d1fcd10>: Failed to establish a new connection: [Errno -2] Name or service not known',)) | |
Traceback (most recent call last): | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/search/common.py", line 60, in is_available | |
conn.search(q="*:*", rows=1) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pysolr.py", line 720, in search | |
response = self._select(params, handler=search_handler) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pysolr.py", line 418, in _select | |
return self._send_request('get', path) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/pysolr.py", line 375, in _send_request | |
raise SolrError(error_message % params) | |
SolrError: Failed to connect to server at 'http://mynewsolrurl/solr/select/?q=%2A%3A%2A&rows=1&wt=json', are you sure that URL is correct? Checking it in a browser might help: HTTPConnectionPool(host='mynewsolrurl', port=80): Max retries exceeded with url: /solr/select/?q=%2A%3A%2A&rows=1&wt=json (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7a8d1fcd10>: Failed to establish a new connection: [Errno -2] Name or service not known',)) | |
ckan.lib.search: WARNING: Problems were found while connecting to the SOLR server | |
ckan.config.environment: INFO: Loading templates from /home/cody/ckan/lib/default/src/ckan/ckan/templates | |
--------------------- >> end captured logging << --------------------- | |
====================================================================== | |
ERROR: ckan.tests.legacy.functional.test_tracking.TestTracking.test_dataset_view_count_throttling | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 421, in test_dataset_view_count_throttling | |
self._update_tracking_summary() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 89, in _update_tracking_summary | |
engine=ckan.model.meta.engine, start_date=date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1067, in update_all | |
self.update_tracking(engine, start_date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1169, in update_tracking | |
engine.execute(sql) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2064, in execute | |
return connection.execute(statement, *multiparams, **params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 939, in execute | |
return self._execute_text(object, multiparams, params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1097, in _execute_text | |
statement, parameters | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception | |
exc_info | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
ProgrammingError: (psycopg2.ProgrammingError) operator does not exist: timestamp without time zone - integer | |
LINE 12: ....tracking_date AND t2.tracking_date >= t1.tracking_date - 14 | |
^ | |
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. | |
[SQL: "UPDATE tracking_summary t1\n SET running_total = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date\n )\n ,recent_views = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date AND t2.tracking_date >= t1.tracking_date - 14\n )\n WHERE t1.running_total = 0 AND tracking_type = 'resource';"] | |
-------------------- >> begin captured logging << -------------------- | |
ckan.model: INFO: Database table data deleted | |
ckan.model: INFO: Database initialised | |
ckan.model: INFO: Database rebuilt | |
ckan.model: INFO: Database table data deleted | |
ckan.model: INFO: Database initialised | |
ckan.model: INFO: Database rebuilt | |
ckan.model: INFO: Database initialised | |
ckan.config.middleware.flask_app: INFO: /api/action/user_show render time 0.007 seconds | |
ckan.config.middleware.flask_app: INFO: /api/action/package_create render time 0.286 seconds | |
ckan.lib.datapreview: WARNING: Plugin for view recline_view could not be found | |
ckan.config.middleware.flask_app: INFO: /api/action/resource_create render time 0.183 seconds | |
--------------------- >> end captured logging << --------------------- | |
====================================================================== | |
ERROR: ckan.tests.legacy.functional.test_tracking.TestTracking.test_export | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 625, in test_export | |
self._update_tracking_summary() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 89, in _update_tracking_summary | |
engine=ckan.model.meta.engine, start_date=date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1067, in update_all | |
self.update_tracking(engine, start_date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1169, in update_tracking | |
engine.execute(sql) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2064, in execute | |
return connection.execute(statement, *multiparams, **params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 939, in execute | |
return self._execute_text(object, multiparams, params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1097, in _execute_text | |
statement, parameters | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception | |
exc_info | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
ProgrammingError: (psycopg2.ProgrammingError) operator does not exist: timestamp without time zone - integer | |
LINE 12: ....tracking_date AND t2.tracking_date >= t1.tracking_date - 14 | |
^ | |
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. | |
[SQL: "UPDATE tracking_summary t1\n SET running_total = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date\n )\n ,recent_views = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date AND t2.tracking_date >= t1.tracking_date - 14\n )\n WHERE t1.running_total = 0 AND tracking_type = 'resource';"] | |
-------------------- >> begin captured logging << -------------------- | |
ckan.config.middleware.flask_app: INFO: /api/action/user_show render time 0.007 seconds | |
ckan.config.middleware.flask_app: INFO: /api/action/package_create render time 0.280 seconds | |
ckan.config.middleware.flask_app: INFO: /api/action/package_create render time 0.283 seconds | |
--------------------- >> end captured logging << --------------------- | |
====================================================================== | |
ERROR: ckan.tests.legacy.functional.test_tracking.TestTracking.test_package_with_many_views | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 307, in test_package_with_many_views | |
self._update_tracking_summary() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 89, in _update_tracking_summary | |
engine=ckan.model.meta.engine, start_date=date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1067, in update_all | |
self.update_tracking(engine, start_date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1169, in update_tracking | |
engine.execute(sql) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2064, in execute | |
return connection.execute(statement, *multiparams, **params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 939, in execute | |
return self._execute_text(object, multiparams, params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1097, in _execute_text | |
statement, parameters | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception | |
exc_info | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
ProgrammingError: (psycopg2.ProgrammingError) operator does not exist: timestamp without time zone - integer | |
LINE 12: ....tracking_date AND t2.tracking_date >= t1.tracking_date - 14 | |
^ | |
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. | |
[SQL: "UPDATE tracking_summary t1\n SET running_total = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date\n )\n ,recent_views = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date AND t2.tracking_date >= t1.tracking_date - 14\n )\n WHERE t1.running_total = 0 AND tracking_type = 'resource';"] | |
-------------------- >> begin captured logging << -------------------- | |
ckan.config.middleware.flask_app: INFO: /api/action/user_show render time 0.006 seconds | |
ckan.config.middleware.flask_app: INFO: /api/action/package_create render time 0.331 seconds | |
ckan.lib.datapreview: WARNING: Plugin for view recline_view could not be found | |
ckan.config.middleware.flask_app: INFO: /api/action/resource_create render time 0.182 seconds | |
--------------------- >> end captured logging << --------------------- | |
====================================================================== | |
ERROR: ckan.tests.legacy.functional.test_tracking.TestTracking.test_package_with_one_view | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 163, in test_package_with_one_view | |
self._update_tracking_summary() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 89, in _update_tracking_summary | |
engine=ckan.model.meta.engine, start_date=date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1067, in update_all | |
self.update_tracking(engine, start_date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1169, in update_tracking | |
engine.execute(sql) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2064, in execute | |
return connection.execute(statement, *multiparams, **params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 939, in execute | |
return self._execute_text(object, multiparams, params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1097, in _execute_text | |
statement, parameters | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception | |
exc_info | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
ProgrammingError: (psycopg2.ProgrammingError) operator does not exist: timestamp without time zone - integer | |
LINE 12: ....tracking_date AND t2.tracking_date >= t1.tracking_date - 14 | |
^ | |
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. | |
[SQL: "UPDATE tracking_summary t1\n SET running_total = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date\n )\n ,recent_views = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date AND t2.tracking_date >= t1.tracking_date - 14\n )\n WHERE t1.running_total = 0 AND tracking_type = 'resource';"] | |
-------------------- >> begin captured logging << -------------------- | |
ckan.config.middleware.flask_app: INFO: /api/action/user_show render time 0.006 seconds | |
ckan.config.middleware.flask_app: INFO: /api/action/package_create render time 0.273 seconds | |
ckan.lib.datapreview: WARNING: Plugin for view recline_view could not be found | |
ckan.config.middleware.flask_app: INFO: /api/action/resource_create render time 0.184 seconds | |
--------------------- >> end captured logging << --------------------- | |
====================================================================== | |
ERROR: ckan.tests.legacy.functional.test_tracking.TestTracking.test_page_with_many_views | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 375, in test_page_with_many_views | |
self._update_tracking_summary() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 89, in _update_tracking_summary | |
engine=ckan.model.meta.engine, start_date=date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1067, in update_all | |
self.update_tracking(engine, start_date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1169, in update_tracking | |
engine.execute(sql) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2064, in execute | |
return connection.execute(statement, *multiparams, **params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 939, in execute | |
return self._execute_text(object, multiparams, params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1097, in _execute_text | |
statement, parameters | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception | |
exc_info | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
ProgrammingError: (psycopg2.ProgrammingError) operator does not exist: timestamp without time zone - integer | |
LINE 12: ....tracking_date AND t2.tracking_date >= t1.tracking_date - 14 | |
^ | |
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. | |
[SQL: "UPDATE tracking_summary t1\n SET running_total = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date\n )\n ,recent_views = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date AND t2.tracking_date >= t1.tracking_date - 14\n )\n WHERE t1.running_total = 0 AND tracking_type = 'resource';"] | |
====================================================================== | |
ERROR: ckan.tests.legacy.functional.test_tracking.TestTracking.test_resource_download_count_throttling | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 447, in test_resource_download_count_throttling | |
self._update_tracking_summary() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 89, in _update_tracking_summary | |
engine=ckan.model.meta.engine, start_date=date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1067, in update_all | |
self.update_tracking(engine, start_date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1169, in update_tracking | |
engine.execute(sql) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2064, in execute | |
return connection.execute(statement, *multiparams, **params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 939, in execute | |
return self._execute_text(object, multiparams, params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1097, in _execute_text | |
statement, parameters | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception | |
exc_info | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
ProgrammingError: (psycopg2.ProgrammingError) operator does not exist: timestamp without time zone - integer | |
LINE 12: ....tracking_date AND t2.tracking_date >= t1.tracking_date - 14 | |
^ | |
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. | |
[SQL: "UPDATE tracking_summary t1\n SET running_total = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date\n )\n ,recent_views = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date AND t2.tracking_date >= t1.tracking_date - 14\n )\n WHERE t1.running_total = 0 AND tracking_type = 'resource';"] | |
-------------------- >> begin captured logging << -------------------- | |
ckan.config.middleware.flask_app: INFO: /api/action/user_show render time 0.007 seconds | |
ckan.config.middleware.flask_app: INFO: /api/action/package_create render time 0.269 seconds | |
ckan.lib.datapreview: WARNING: Plugin for view recline_view could not be found | |
ckan.config.middleware.flask_app: INFO: /api/action/resource_create render time 0.194 seconds | |
--------------------- >> end captured logging << --------------------- | |
====================================================================== | |
ERROR: ckan.tests.legacy.functional.test_tracking.TestTracking.test_resource_with_many_downloads | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 340, in test_resource_with_many_downloads | |
self._update_tracking_summary() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 89, in _update_tracking_summary | |
engine=ckan.model.meta.engine, start_date=date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1067, in update_all | |
self.update_tracking(engine, start_date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1169, in update_tracking | |
engine.execute(sql) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2064, in execute | |
return connection.execute(statement, *multiparams, **params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 939, in execute | |
return self._execute_text(object, multiparams, params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1097, in _execute_text | |
statement, parameters | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception | |
exc_info | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
ProgrammingError: (psycopg2.ProgrammingError) operator does not exist: timestamp without time zone - integer | |
LINE 12: ....tracking_date AND t2.tracking_date >= t1.tracking_date - 14 | |
^ | |
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. | |
[SQL: "UPDATE tracking_summary t1\n SET running_total = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date\n )\n ,recent_views = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date AND t2.tracking_date >= t1.tracking_date - 14\n )\n WHERE t1.running_total = 0 AND tracking_type = 'resource';"] | |
-------------------- >> begin captured logging << -------------------- | |
ckan.config.middleware.flask_app: INFO: /api/action/user_show render time 0.007 seconds | |
ckan.config.middleware.flask_app: INFO: /api/action/package_create render time 0.267 seconds | |
ckan.lib.datapreview: WARNING: Plugin for view recline_view could not be found | |
ckan.config.middleware.flask_app: INFO: /api/action/resource_create render time 0.183 seconds | |
--------------------- >> end captured logging << --------------------- | |
====================================================================== | |
ERROR: ckan.tests.legacy.functional.test_tracking.TestTracking.test_resource_with_one_download | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 232, in test_resource_with_one_download | |
self._update_tracking_summary() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 89, in _update_tracking_summary | |
engine=ckan.model.meta.engine, start_date=date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1067, in update_all | |
self.update_tracking(engine, start_date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1169, in update_tracking | |
engine.execute(sql) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2064, in execute | |
return connection.execute(statement, *multiparams, **params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 939, in execute | |
return self._execute_text(object, multiparams, params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1097, in _execute_text | |
statement, parameters | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception | |
exc_info | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
ProgrammingError: (psycopg2.ProgrammingError) operator does not exist: timestamp without time zone - integer | |
LINE 12: ....tracking_date AND t2.tracking_date >= t1.tracking_date - 14 | |
^ | |
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. | |
[SQL: "UPDATE tracking_summary t1\n SET running_total = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date\n )\n ,recent_views = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date AND t2.tracking_date >= t1.tracking_date - 14\n )\n WHERE t1.running_total = 0 AND tracking_type = 'resource';"] | |
-------------------- >> begin captured logging << -------------------- | |
ckan.config.middleware.flask_app: INFO: /api/action/user_show render time 0.006 seconds | |
ckan.config.middleware.flask_app: INFO: /api/action/package_create render time 0.276 seconds | |
ckan.lib.datapreview: WARNING: Plugin for view recline_view could not be found | |
ckan.config.middleware.flask_app: INFO: /api/action/resource_create render time 0.185 seconds | |
--------------------- >> end captured logging << --------------------- | |
====================================================================== | |
ERROR: ckan.tests.legacy.functional.test_tracking.TestTracking.test_resource_with_one_preview | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 196, in test_resource_with_one_preview | |
self._update_tracking_summary() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 89, in _update_tracking_summary | |
engine=ckan.model.meta.engine, start_date=date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1067, in update_all | |
self.update_tracking(engine, start_date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1169, in update_tracking | |
engine.execute(sql) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2064, in execute | |
return connection.execute(statement, *multiparams, **params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 939, in execute | |
return self._execute_text(object, multiparams, params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1097, in _execute_text | |
statement, parameters | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception | |
exc_info | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
ProgrammingError: (psycopg2.ProgrammingError) operator does not exist: timestamp without time zone - integer | |
LINE 12: ....tracking_date AND t2.tracking_date >= t1.tracking_date - 14 | |
^ | |
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. | |
[SQL: "UPDATE tracking_summary t1\n SET running_total = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date\n )\n ,recent_views = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date AND t2.tracking_date >= t1.tracking_date - 14\n )\n WHERE t1.running_total = 0 AND tracking_type = 'resource';"] | |
-------------------- >> begin captured logging << -------------------- | |
ckan.config.middleware.flask_app: INFO: /api/action/user_show render time 0.006 seconds | |
ckan.config.middleware.flask_app: INFO: /api/action/package_create render time 0.305 seconds | |
ckan.lib.datapreview: WARNING: Plugin for view recline_view could not be found | |
ckan.config.middleware.flask_app: INFO: /api/action/resource_create render time 0.188 seconds | |
--------------------- >> end captured logging << --------------------- | |
====================================================================== | |
ERROR: ckan.tests.legacy.functional.test_tracking.TestTracking.test_sorting_datasets_by_recent_views | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 486, in test_sorting_datasets_by_recent_views | |
self._update_tracking_summary() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 89, in _update_tracking_summary | |
engine=ckan.model.meta.engine, start_date=date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1067, in update_all | |
self.update_tracking(engine, start_date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1169, in update_tracking | |
engine.execute(sql) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2064, in execute | |
return connection.execute(statement, *multiparams, **params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 939, in execute | |
return self._execute_text(object, multiparams, params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1097, in _execute_text | |
statement, parameters | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception | |
exc_info | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
ProgrammingError: (psycopg2.ProgrammingError) operator does not exist: timestamp without time zone - integer | |
LINE 12: ....tracking_date AND t2.tracking_date >= t1.tracking_date - 14 | |
^ | |
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. | |
[SQL: "UPDATE tracking_summary t1\n SET running_total = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date\n )\n ,recent_views = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date AND t2.tracking_date >= t1.tracking_date - 14\n )\n WHERE t1.running_total = 0 AND tracking_type = 'resource';"] | |
-------------------- >> begin captured logging << -------------------- | |
ckan.config.middleware.flask_app: INFO: /api/action/user_show render time 0.006 seconds | |
ckan.config.middleware.flask_app: INFO: /api/action/package_create render time 0.297 seconds | |
ckan.config.middleware.flask_app: INFO: /api/action/package_create render time 0.278 seconds | |
ckan.config.middleware.flask_app: INFO: /api/action/package_create render time 0.284 seconds | |
--------------------- >> end captured logging << --------------------- | |
====================================================================== | |
ERROR: ckan.tests.legacy.functional.test_tracking.TestTracking.test_sorting_datasets_by_total_views | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 526, in test_sorting_datasets_by_total_views | |
self._update_tracking_summary() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 89, in _update_tracking_summary | |
engine=ckan.model.meta.engine, start_date=date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1067, in update_all | |
self.update_tracking(engine, start_date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1169, in update_tracking | |
engine.execute(sql) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2064, in execute | |
return connection.execute(statement, *multiparams, **params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 939, in execute | |
return self._execute_text(object, multiparams, params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1097, in _execute_text | |
statement, parameters | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception | |
exc_info | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
ProgrammingError: (psycopg2.ProgrammingError) operator does not exist: timestamp without time zone - integer | |
LINE 12: ....tracking_date AND t2.tracking_date >= t1.tracking_date - 14 | |
^ | |
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. | |
[SQL: "UPDATE tracking_summary t1\n SET running_total = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date\n )\n ,recent_views = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date AND t2.tracking_date >= t1.tracking_date - 14\n )\n WHERE t1.running_total = 0 AND tracking_type = 'resource';"] | |
-------------------- >> begin captured logging << -------------------- | |
ckan.config.middleware.flask_app: INFO: /api/action/user_show render time 0.006 seconds | |
ckan.config.middleware.flask_app: INFO: /api/action/package_create render time 0.269 seconds | |
ckan.config.middleware.flask_app: INFO: /api/action/package_create render time 0.273 seconds | |
ckan.config.middleware.flask_app: INFO: /api/action/package_create render time 0.275 seconds | |
--------------------- >> end captured logging << --------------------- | |
====================================================================== | |
ERROR: ckan.tests.legacy.functional.test_tracking.TestTracking.test_view_page | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 273, in test_view_page | |
self._update_tracking_summary() | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/functional/test_tracking.py", line 89, in _update_tracking_summary | |
engine=ckan.model.meta.engine, start_date=date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1067, in update_all | |
self.update_tracking(engine, start_date) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 1169, in update_tracking | |
engine.execute(sql) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2064, in execute | |
return connection.execute(statement, *multiparams, **params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 939, in execute | |
return self._execute_text(object, multiparams, params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1097, in _execute_text | |
statement, parameters | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception | |
exc_info | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
ProgrammingError: (psycopg2.ProgrammingError) operator does not exist: timestamp without time zone - integer | |
LINE 12: ....tracking_date AND t2.tracking_date >= t1.tracking_date - 14 | |
^ | |
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. | |
[SQL: "UPDATE tracking_summary t1\n SET running_total = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date\n )\n ,recent_views = (\n SELECT sum(count)\n FROM tracking_summary t2\n WHERE t1.url = t2.url\n AND t2.tracking_date <= t1.tracking_date AND t2.tracking_date >= t1.tracking_date - 14\n )\n WHERE t1.running_total = 0 AND tracking_type = 'resource';"] | |
====================================================================== | |
ERROR: ckan.tests.legacy.lib.test_dictization.TestBasicDictize.test_14_resource_no_id | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/lib/test_dictization.py", line 487, in test_14_resource_no_id | |
model.Session.commit() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 157, in do | |
return getattr(self.registry(), name)(*args, **kwargs) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 906, in commit | |
self.transaction.commit() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 461, in commit | |
self._prepare_impl() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 430, in _prepare_impl | |
self.session.dispatch.before_commit(self.session) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/event/attr.py", line 256, in __call__ | |
fn(*args, **kw) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/model/meta.py", line 55, in before_commit | |
session.flush() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2171, in flush | |
self._flush(objects) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2291, in _flush | |
transaction.rollback(_capture_exception=True) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__ | |
compat.reraise(exc_type, exc_value, exc_tb) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2255, in _flush | |
flush_context.execute() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 389, in execute | |
rec.execute(self) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 548, in execute | |
uow | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 181, in save_obj | |
mapper, table, insert) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 799, in _emit_insert_statements | |
execute(statement, multiparams) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 945, in execute | |
return meth(self, multiparams, params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 263, in _execute_on_connection | |
return connection._execute_clauseelement(self, multiparams, params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1053, in _execute_clauseelement | |
compiled_sql, distilled_params | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception | |
exc_info | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
IntegrityError: (psycopg2.IntegrityError) insert or update on table "resource" violates foreign key constraint "resource_package_id_fkey" | |
DETAIL: Key (package_id)=() is not present in table "package". | |
[SQL: 'INSERT INTO resource (id, package_id, url, format, description, hash, position, name, resource_type, mimetype, mimetype_inner, size, created, last_modified, cache_url, cache_last_updated, url_type, extras, state, revision_id) VALUES (%(id)s, %(package_id)s, %(url)s, %(format)s, %(description)s, %(hash)s, %(position)s, %(name)s, %(resource_type)s, %(mimetype)s, %(mimetype_inner)s, %(size)s, %(created)s, %(last_modified)s, %(cache_url)s, %(cache_last_updated)s, %(url_type)s, %(extras)s, %(state)s, %(revision_id)s)'] [parameters: {'mimetype': None, 'cache_url': None, 'hash': u'abc123', 'name': None, 'format': u'plain text', 'url': u'http://test_new', 'cache_last_updated': None, 'state': u'active', 'created': datetime.datetime(2019, 1, 30, 18, 47, 54, 662380), 'package_id': '', 'mimetype_inner': None, 'resource_type': None, 'last_modified': None, 'position': 0, 'revision_id': u'0902f48b-1858-4d16-b0d4-d4b4c712f27c', 'size': None, 'url_type': None, 'id': u'03c9afcf-6262-4ad5-b135-c2d282008c86', 'extras': u'{"alt_url": "empty resource group id", "size_extra": "123"}', 'description': u'Full text. Needs escaping: " Umlaut: \xfc'}] | |
====================================================================== | |
ERROR: ckan.tests.legacy.lib.test_dictization.TestBasicDictize.test_15_api_to_dictize | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/lib/test_dictization.py", line 556, in test_15_api_to_dictize | |
model.repo.new_revision() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/vdm/sqlalchemy/tools.py", line 130, in new_revision | |
SQLAlchemySession.set_revision(self.session, rev) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/vdm/sqlalchemy/base.py", line 51, in set_revision | |
session.flush() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 157, in do | |
return getattr(self.registry(), name)(*args, **kwargs) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2171, in flush | |
self._flush(objects) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2251, in _flush | |
subtransactions=True) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 817, in begin | |
nested=nested) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 297, in _begin | |
self._assert_active() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 276, in _assert_active | |
% self._rollback_exception | |
InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (psycopg2.IntegrityError) insert or update on table "resource" violates foreign key constraint "resource_package_id_fkey" | |
DETAIL: Key (package_id)=() is not present in table "package". | |
[SQL: 'INSERT INTO resource (id, package_id, url, format, description, hash, position, name, resource_type, mimetype, mimetype_inner, size, created, last_modified, cache_url, cache_last_updated, url_type, extras, state, revision_id) VALUES (%(id)s, %(package_id)s, %(url)s, %(format)s, %(description)s, %(hash)s, %(position)s, %(name)s, %(resource_type)s, %(mimetype)s, %(mimetype_inner)s, %(size)s, %(created)s, %(last_modified)s, %(cache_url)s, %(cache_last_updated)s, %(url_type)s, %(extras)s, %(state)s, %(revision_id)s)'] [parameters: {'mimetype': None, 'cache_url': None, 'hash': u'abc123', 'name': None, 'format': u'plain text', 'url': u'http://test_new', 'cache_last_updated': None, 'state': u'active', 'created': datetime.datetime(2019, 1, 30, 18, 47, 54, 662380), 'package_id': '', 'mimetype_inner': None, 'resource_type': None, 'last_modified': None, 'position': 0, 'revision_id': u'0902f48b-1858-4d16-b0d4-d4b4c712f27c', 'size': None, 'url_type': None, 'id': u'03c9afcf-6262-4ad5-b135-c2d282008c86', 'extras': u'{"alt_url": "empty resource group id", "size_extra": "123"}', 'description': u'Full text. Needs escaping: " Umlaut: \xfc'}] | |
====================================================================== | |
ERROR: ckan.tests.legacy.lib.test_dictization.TestBasicDictize.test_18_package_tag_list_save | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/lib/test_dictization.py", line 592, in test_18_package_tag_list_save | |
rev = model.repo.new_revision() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/vdm/sqlalchemy/tools.py", line 130, in new_revision | |
SQLAlchemySession.set_revision(self.session, rev) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/vdm/sqlalchemy/base.py", line 51, in set_revision | |
session.flush() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 157, in do | |
return getattr(self.registry(), name)(*args, **kwargs) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2171, in flush | |
self._flush(objects) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2251, in _flush | |
subtransactions=True) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 817, in begin | |
nested=nested) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 297, in _begin | |
self._assert_active() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 276, in _assert_active | |
% self._rollback_exception | |
InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (psycopg2.IntegrityError) insert or update on table "resource" violates foreign key constraint "resource_package_id_fkey" | |
DETAIL: Key (package_id)=() is not present in table "package". | |
[SQL: 'INSERT INTO resource (id, package_id, url, format, description, hash, position, name, resource_type, mimetype, mimetype_inner, size, created, last_modified, cache_url, cache_last_updated, url_type, extras, state, revision_id) VALUES (%(id)s, %(package_id)s, %(url)s, %(format)s, %(description)s, %(hash)s, %(position)s, %(name)s, %(resource_type)s, %(mimetype)s, %(mimetype_inner)s, %(size)s, %(created)s, %(last_modified)s, %(cache_url)s, %(cache_last_updated)s, %(url_type)s, %(extras)s, %(state)s, %(revision_id)s)'] [parameters: {'mimetype': None, 'cache_url': None, 'hash': u'abc123', 'name': None, 'format': u'plain text', 'url': u'http://test_new', 'cache_last_updated': None, 'state': u'active', 'created': datetime.datetime(2019, 1, 30, 18, 47, 54, 662380), 'package_id': '', 'mimetype_inner': None, 'resource_type': None, 'last_modified': None, 'position': 0, 'revision_id': u'0902f48b-1858-4d16-b0d4-d4b4c712f27c', 'size': None, 'url_type': None, 'id': u'03c9afcf-6262-4ad5-b135-c2d282008c86', 'extras': u'{"alt_url": "empty resource group id", "size_extra": "123"}', 'description': u'Full text. Needs escaping: " Umlaut: \xfc'}] | |
====================================================================== | |
ERROR: ckan.tests.legacy.lib.test_dictization.TestBasicDictize.test_19_package_tag_list_save_duplicates | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/lib/test_dictization.py", line 609, in test_19_package_tag_list_save_duplicates | |
rev = model.repo.new_revision() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/vdm/sqlalchemy/tools.py", line 130, in new_revision | |
SQLAlchemySession.set_revision(self.session, rev) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/vdm/sqlalchemy/base.py", line 51, in set_revision | |
session.flush() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 157, in do | |
return getattr(self.registry(), name)(*args, **kwargs) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2171, in flush | |
self._flush(objects) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2251, in _flush | |
subtransactions=True) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 817, in begin | |
nested=nested) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 297, in _begin | |
self._assert_active() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 276, in _assert_active | |
% self._rollback_exception | |
InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (psycopg2.IntegrityError) insert or update on table "resource" violates foreign key constraint "resource_package_id_fkey" | |
DETAIL: Key (package_id)=() is not present in table "package". | |
[SQL: 'INSERT INTO resource (id, package_id, url, format, description, hash, position, name, resource_type, mimetype, mimetype_inner, size, created, last_modified, cache_url, cache_last_updated, url_type, extras, state, revision_id) VALUES (%(id)s, %(package_id)s, %(url)s, %(format)s, %(description)s, %(hash)s, %(position)s, %(name)s, %(resource_type)s, %(mimetype)s, %(mimetype_inner)s, %(size)s, %(created)s, %(last_modified)s, %(cache_url)s, %(cache_last_updated)s, %(url_type)s, %(extras)s, %(state)s, %(revision_id)s)'] [parameters: {'mimetype': None, 'cache_url': None, 'hash': u'abc123', 'name': None, 'format': u'plain text', 'url': u'http://test_new', 'cache_last_updated': None, 'state': u'active', 'created': datetime.datetime(2019, 1, 30, 18, 47, 54, 662380), 'package_id': '', 'mimetype_inner': None, 'resource_type': None, 'last_modified': None, 'position': 0, 'revision_id': u'0902f48b-1858-4d16-b0d4-d4b4c712f27c', 'size': None, 'url_type': None, 'id': u'03c9afcf-6262-4ad5-b135-c2d282008c86', 'extras': u'{"alt_url": "empty resource group id", "size_extra": "123"}', 'description': u'Full text. Needs escaping: " Umlaut: \xfc'}] | |
====================================================================== | |
ERROR: ckan.tests.legacy.lib.test_dictization.TestBasicDictize.test_20_activity_save | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/lib/test_dictization.py", line 624, in test_20_activity_save | |
user = model.User.by_name(u'tester') | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/model/domain_object.py", line 46, in by_name | |
.filter_by(name=name).first() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2755, in first | |
ret = list(self[0:1]) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2547, in __getitem__ | |
return list(res) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2855, in __iter__ | |
return self._execute_and_instances(context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2876, in _execute_and_instances | |
close_with_result=True) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2885, in _get_bind_args | |
**kw | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2867, in _connection_from_session | |
conn = self.session.connection(**kw) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 998, in connection | |
execution_options=execution_options) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1003, in _connection_for_bind | |
engine, execution_options) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 382, in _connection_for_bind | |
self._assert_active() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 276, in _assert_active | |
% self._rollback_exception | |
InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (psycopg2.IntegrityError) insert or update on table "resource" violates foreign key constraint "resource_package_id_fkey" | |
DETAIL: Key (package_id)=() is not present in table "package". | |
[SQL: 'INSERT INTO resource (id, package_id, url, format, description, hash, position, name, resource_type, mimetype, mimetype_inner, size, created, last_modified, cache_url, cache_last_updated, url_type, extras, state, revision_id) VALUES (%(id)s, %(package_id)s, %(url)s, %(format)s, %(description)s, %(hash)s, %(position)s, %(name)s, %(resource_type)s, %(mimetype)s, %(mimetype_inner)s, %(size)s, %(created)s, %(last_modified)s, %(cache_url)s, %(cache_last_updated)s, %(url_type)s, %(extras)s, %(state)s, %(revision_id)s)'] [parameters: {'mimetype': None, 'cache_url': None, 'hash': u'abc123', 'name': None, 'format': u'plain text', 'url': u'http://test_new', 'cache_last_updated': None, 'state': u'active', 'created': datetime.datetime(2019, 1, 30, 18, 47, 54, 662380), 'package_id': '', 'mimetype_inner': None, 'resource_type': None, 'last_modified': None, 'position': 0, 'revision_id': u'0902f48b-1858-4d16-b0d4-d4b4c712f27c', 'size': None, 'url_type': None, 'id': u'03c9afcf-6262-4ad5-b135-c2d282008c86', 'extras': u'{"alt_url": "empty resource group id", "size_extra": "123"}', 'description': u'Full text. Needs escaping: " Umlaut: \xfc'}] | |
====================================================================== | |
ERROR: ckan.tests.legacy.lib.test_dictization.TestBasicDictize.test_21_package_dictization_with_deleted_group | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/lib/test_dictization.py", line 658, in test_21_package_dictization_with_deleted_group | |
model.repo.new_revision() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/vdm/sqlalchemy/tools.py", line 130, in new_revision | |
SQLAlchemySession.set_revision(self.session, rev) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/vdm/sqlalchemy/base.py", line 51, in set_revision | |
session.flush() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 157, in do | |
return getattr(self.registry(), name)(*args, **kwargs) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2171, in flush | |
self._flush(objects) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2251, in _flush | |
subtransactions=True) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 817, in begin | |
nested=nested) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 297, in _begin | |
self._assert_active() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 276, in _assert_active | |
% self._rollback_exception | |
InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (psycopg2.IntegrityError) insert or update on table "resource" violates foreign key constraint "resource_package_id_fkey" | |
DETAIL: Key (package_id)=() is not present in table "package". | |
[SQL: 'INSERT INTO resource (id, package_id, url, format, description, hash, position, name, resource_type, mimetype, mimetype_inner, size, created, last_modified, cache_url, cache_last_updated, url_type, extras, state, revision_id) VALUES (%(id)s, %(package_id)s, %(url)s, %(format)s, %(description)s, %(hash)s, %(position)s, %(name)s, %(resource_type)s, %(mimetype)s, %(mimetype_inner)s, %(size)s, %(created)s, %(last_modified)s, %(cache_url)s, %(cache_last_updated)s, %(url_type)s, %(extras)s, %(state)s, %(revision_id)s)'] [parameters: {'mimetype': None, 'cache_url': None, 'hash': u'abc123', 'name': None, 'format': u'plain text', 'url': u'http://test_new', 'cache_last_updated': None, 'state': u'active', 'created': datetime.datetime(2019, 1, 30, 18, 47, 54, 662380), 'package_id': '', 'mimetype_inner': None, 'resource_type': None, 'last_modified': None, 'position': 0, 'revision_id': u'0902f48b-1858-4d16-b0d4-d4b4c712f27c', 'size': None, 'url_type': None, 'id': u'03c9afcf-6262-4ad5-b135-c2d282008c86', 'extras': u'{"alt_url": "empty resource group id", "size_extra": "123"}', 'description': u'Full text. Needs escaping: " Umlaut: \xfc'}] | |
====================================================================== | |
ERROR: ckan.tests.legacy.lib.test_dictization.TestBasicDictize.test_22_user_dictize_as_sysadmin | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/lib/test_dictization.py", line 702, in test_22_user_dictize_as_sysadmin | |
user = model.User.by_name('tester') | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/model/domain_object.py", line 46, in by_name | |
.filter_by(name=name).first() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2755, in first | |
ret = list(self[0:1]) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2547, in __getitem__ | |
return list(res) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2855, in __iter__ | |
return self._execute_and_instances(context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2876, in _execute_and_instances | |
close_with_result=True) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2885, in _get_bind_args | |
**kw | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2867, in _connection_from_session | |
conn = self.session.connection(**kw) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 998, in connection | |
execution_options=execution_options) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1003, in _connection_for_bind | |
engine, execution_options) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 382, in _connection_for_bind | |
self._assert_active() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 276, in _assert_active | |
% self._rollback_exception | |
InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (psycopg2.IntegrityError) insert or update on table "resource" violates foreign key constraint "resource_package_id_fkey" | |
DETAIL: Key (package_id)=() is not present in table "package". | |
[SQL: 'INSERT INTO resource (id, package_id, url, format, description, hash, position, name, resource_type, mimetype, mimetype_inner, size, created, last_modified, cache_url, cache_last_updated, url_type, extras, state, revision_id) VALUES (%(id)s, %(package_id)s, %(url)s, %(format)s, %(description)s, %(hash)s, %(position)s, %(name)s, %(resource_type)s, %(mimetype)s, %(mimetype_inner)s, %(size)s, %(created)s, %(last_modified)s, %(cache_url)s, %(cache_last_updated)s, %(url_type)s, %(extras)s, %(state)s, %(revision_id)s)'] [parameters: {'mimetype': None, 'cache_url': None, 'hash': u'abc123', 'name': None, 'format': u'plain text', 'url': u'http://test_new', 'cache_last_updated': None, 'state': u'active', 'created': datetime.datetime(2019, 1, 30, 18, 47, 54, 662380), 'package_id': '', 'mimetype_inner': None, 'resource_type': None, 'last_modified': None, 'position': 0, 'revision_id': u'0902f48b-1858-4d16-b0d4-d4b4c712f27c', 'size': None, 'url_type': None, 'id': u'03c9afcf-6262-4ad5-b135-c2d282008c86', 'extras': u'{"alt_url": "empty resource group id", "size_extra": "123"}', 'description': u'Full text. Needs escaping: " Umlaut: \xfc'}] | |
====================================================================== | |
ERROR: ckan.tests.legacy.lib.test_dictization.TestBasicDictize.test_23_user_dictize_as_same_user | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/lib/test_dictization.py", line 726, in test_23_user_dictize_as_same_user | |
user = model.User.by_name('tester') | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/model/domain_object.py", line 46, in by_name | |
.filter_by(name=name).first() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2755, in first | |
ret = list(self[0:1]) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2547, in __getitem__ | |
return list(res) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2855, in __iter__ | |
return self._execute_and_instances(context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2876, in _execute_and_instances | |
close_with_result=True) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2885, in _get_bind_args | |
**kw | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2867, in _connection_from_session | |
conn = self.session.connection(**kw) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 998, in connection | |
execution_options=execution_options) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1003, in _connection_for_bind | |
engine, execution_options) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 382, in _connection_for_bind | |
self._assert_active() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 276, in _assert_active | |
% self._rollback_exception | |
InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (psycopg2.IntegrityError) insert or update on table "resource" violates foreign key constraint "resource_package_id_fkey" | |
DETAIL: Key (package_id)=() is not present in table "package". | |
[SQL: 'INSERT INTO resource (id, package_id, url, format, description, hash, position, name, resource_type, mimetype, mimetype_inner, size, created, last_modified, cache_url, cache_last_updated, url_type, extras, state, revision_id) VALUES (%(id)s, %(package_id)s, %(url)s, %(format)s, %(description)s, %(hash)s, %(position)s, %(name)s, %(resource_type)s, %(mimetype)s, %(mimetype_inner)s, %(size)s, %(created)s, %(last_modified)s, %(cache_url)s, %(cache_last_updated)s, %(url_type)s, %(extras)s, %(state)s, %(revision_id)s)'] [parameters: {'mimetype': None, 'cache_url': None, 'hash': u'abc123', 'name': None, 'format': u'plain text', 'url': u'http://test_new', 'cache_last_updated': None, 'state': u'active', 'created': datetime.datetime(2019, 1, 30, 18, 47, 54, 662380), 'package_id': '', 'mimetype_inner': None, 'resource_type': None, 'last_modified': None, 'position': 0, 'revision_id': u'0902f48b-1858-4d16-b0d4-d4b4c712f27c', 'size': None, 'url_type': None, 'id': u'03c9afcf-6262-4ad5-b135-c2d282008c86', 'extras': u'{"alt_url": "empty resource group id", "size_extra": "123"}', 'description': u'Full text. Needs escaping: " Umlaut: \xfc'}] | |
====================================================================== | |
ERROR: ckan.tests.legacy.lib.test_dictization.TestBasicDictize.test_24_user_dictize_as_other_user | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/lib/test_dictization.py", line 750, in test_24_user_dictize_as_other_user | |
user = model.User.by_name('tester') | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/model/domain_object.py", line 46, in by_name | |
.filter_by(name=name).first() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2755, in first | |
ret = list(self[0:1]) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2547, in __getitem__ | |
return list(res) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2855, in __iter__ | |
return self._execute_and_instances(context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2876, in _execute_and_instances | |
close_with_result=True) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2885, in _get_bind_args | |
**kw | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2867, in _connection_from_session | |
conn = self.session.connection(**kw) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 998, in connection | |
execution_options=execution_options) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1003, in _connection_for_bind | |
engine, execution_options) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 382, in _connection_for_bind | |
self._assert_active() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 276, in _assert_active | |
% self._rollback_exception | |
InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (psycopg2.IntegrityError) insert or update on table "resource" violates foreign key constraint "resource_package_id_fkey" | |
DETAIL: Key (package_id)=() is not present in table "package". | |
[SQL: 'INSERT INTO resource (id, package_id, url, format, description, hash, position, name, resource_type, mimetype, mimetype_inner, size, created, last_modified, cache_url, cache_last_updated, url_type, extras, state, revision_id) VALUES (%(id)s, %(package_id)s, %(url)s, %(format)s, %(description)s, %(hash)s, %(position)s, %(name)s, %(resource_type)s, %(mimetype)s, %(mimetype_inner)s, %(size)s, %(created)s, %(last_modified)s, %(cache_url)s, %(cache_last_updated)s, %(url_type)s, %(extras)s, %(state)s, %(revision_id)s)'] [parameters: {'mimetype': None, 'cache_url': None, 'hash': u'abc123', 'name': None, 'format': u'plain text', 'url': u'http://test_new', 'cache_last_updated': None, 'state': u'active', 'created': datetime.datetime(2019, 1, 30, 18, 47, 54, 662380), 'package_id': '', 'mimetype_inner': None, 'resource_type': None, 'last_modified': None, 'position': 0, 'revision_id': u'0902f48b-1858-4d16-b0d4-d4b4c712f27c', 'size': None, 'url_type': None, 'id': u'03c9afcf-6262-4ad5-b135-c2d282008c86', 'extras': u'{"alt_url": "empty resource group id", "size_extra": "123"}', 'description': u'Full text. Needs escaping: " Umlaut: \xfc'}] | |
====================================================================== | |
ERROR: ckan.tests.legacy.lib.test_dictization.TestBasicDictize.test_25_user_dictize_as_anonymous | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/legacy/lib/test_dictization.py", line 774, in test_25_user_dictize_as_anonymous | |
user = model.User.by_name('tester') | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/model/domain_object.py", line 46, in by_name | |
.filter_by(name=name).first() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2755, in first | |
ret = list(self[0:1]) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2547, in __getitem__ | |
return list(res) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2855, in __iter__ | |
return self._execute_and_instances(context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2876, in _execute_and_instances | |
close_with_result=True) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2885, in _get_bind_args | |
**kw | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2867, in _connection_from_session | |
conn = self.session.connection(**kw) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 998, in connection | |
execution_options=execution_options) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1003, in _connection_for_bind | |
engine, execution_options) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 382, in _connection_for_bind | |
self._assert_active() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 276, in _assert_active | |
% self._rollback_exception | |
InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (psycopg2.IntegrityError) insert or update on table "resource" violates foreign key constraint "resource_package_id_fkey" | |
DETAIL: Key (package_id)=() is not present in table "package". | |
[SQL: 'INSERT INTO resource (id, package_id, url, format, description, hash, position, name, resource_type, mimetype, mimetype_inner, size, created, last_modified, cache_url, cache_last_updated, url_type, extras, state, revision_id) VALUES (%(id)s, %(package_id)s, %(url)s, %(format)s, %(description)s, %(hash)s, %(position)s, %(name)s, %(resource_type)s, %(mimetype)s, %(mimetype_inner)s, %(size)s, %(created)s, %(last_modified)s, %(cache_url)s, %(cache_last_updated)s, %(url_type)s, %(extras)s, %(state)s, %(revision_id)s)'] [parameters: {'mimetype': None, 'cache_url': None, 'hash': u'abc123', 'name': None, 'format': u'plain text', 'url': u'http://test_new', 'cache_last_updated': None, 'state': u'active', 'created': datetime.datetime(2019, 1, 30, 18, 47, 54, 662380), 'package_id': '', 'mimetype_inner': None, 'resource_type': None, 'last_modified': None, 'position': 0, 'revision_id': u'0902f48b-1858-4d16-b0d4-d4b4c712f27c', 'size': None, 'url_type': None, 'id': u'03c9afcf-6262-4ad5-b135-c2d282008c86', 'extras': u'{"alt_url": "empty resource group id", "size_extra": "123"}', 'description': u'Full text. Needs escaping: " Umlaut: \xfc'}] | |
====================================================================== | |
ERROR: ckan.tests.model.test_resource_view.TestResourceView.test_purging_resource_removes_its_resource_views | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/tests/model/test_resource_view.py", line 72, in test_purging_resource_removes_its_resource_views | |
model.repo.commit_and_remove() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/vdm/sqlalchemy/tools.py", line 117, in commit_and_remove | |
self.commit() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/vdm/sqlalchemy/tools.py", line 107, in commit | |
self.session.commit() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 157, in do | |
return getattr(self.registry(), name)(*args, **kwargs) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 906, in commit | |
self.transaction.commit() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 461, in commit | |
self._prepare_impl() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 430, in _prepare_impl | |
self.session.dispatch.before_commit(self.session) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/event/attr.py", line 256, in __call__ | |
fn(*args, **kw) | |
File "/home/cody/ckan/lib/default/src/ckan/ckan/model/meta.py", line 55, in before_commit | |
session.flush() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2171, in flush | |
self._flush(objects) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2291, in _flush | |
transaction.rollback(_capture_exception=True) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__ | |
compat.reraise(exc_type, exc_value, exc_tb) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2255, in _flush | |
flush_context.execute() | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 389, in execute | |
rec.execute(self) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 577, in execute | |
uow | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 258, in delete_obj | |
cached_connections, mapper, table, delete) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 931, in _emit_delete_statements | |
c = connection.execute(statement, del_objects) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 945, in execute | |
return meth(self, multiparams, params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 263, in _execute_on_connection | |
return connection._execute_clauseelement(self, multiparams, params) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1053, in _execute_clauseelement | |
compiled_sql, distilled_params | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception | |
exc_info | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause | |
reraise(type(exception), exception, tb=exc_tb, cause=cause) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context | |
context) | |
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute | |
cursor.execute(statement, parameters) | |
IntegrityError: (psycopg2.IntegrityError) update or delete on table "resource" violates foreign key constraint "resource_view_resource_id_fkey" on table "resource_view" | |
DETAIL: Key (id)=(d368788a-1609-4892-aa24-74608da5f97a) is still referenced from table "resource_view". | |
[SQL: 'DELETE FROM resource WHERE resource.id = %(id)s'] [parameters: {'id': u'd368788a-1609-4892-aa24-74608da5f97a'}] | |
---------------------------------------------------------------------- | |
Ran 2357 tests in 1103.545s | |
FAILED (SKIP=3, errors=25) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment