Ckan: Enormous amount warnings _resource_preview() has been deprecated in log file

Created on 16 Aug 2017  路  8Comments  路  Source: ckan/ckan

CKAN Version if known (or site URL)

https://ckan.otevrenamesta.cz/api/util/status

Please describe the expected behaviour

More clear/smart log ;)

Please describe the actual behaviour

[:error] [pid 1515] 2017-08-16 13:24:54,198 WARNI [ckan.lib.maintain] Function _resource_preview() in module ckan.controllers.package has been deprecated and will be removed in a later release of ckan. Resource preview is deprecated. Please use the new resource views
[:error] [pid 1515] 2017-08-16 13:24:54,198 WARNI [ckan.lib.maintain] Function _resource_preview() in module ckan.controllers.package has been deprecated and will be removed in a later release of ckan. Resource preview is deprecated. Please use the new resource views
[:error] [pid 1515] 2017-08-16 13:24:54,198 WARNI [ckan.lib.maintain] Function _resource_preview() in module ckan.controllers.package has been deprecated and will be removed in a later release of ckan. Resource preview is deprecated. Please use the new resource views

What steps can be taken to reproduce the issue?

Have a look at ckan_default.error.log

Good for Contribution

Most helpful comment

@nesnera yes, we should really remove that old code. Do you have any time to look at this?

All 8 comments

@nesnera yes, we should really remove that old code. Do you have any time to look at this?

@wardi :D I see :D

i have same problem with @nesnera , how the solution for this issue?

Having a lot of trouble as this is my only error and I am unable to use data explorer now!!

I have same warning, does anyone has solution?

"
2018-01-12 12:27:26,896 WARNI [ckan.lib.maintain] Function _resource_preview() in module ckan.controllers.package has been deprecated and will be removed in a later release of ckan. Resource preview is deprecated. Please use the new resource views
2018-01-12 12:27:27,142 INFO [ckan.lib.base] /dataset/dataset-for-organization-my-sample-origanization/resource/3e40b103-99b7-495a-ab37-9127174841dc render time 0.269 seconds
2018-01-12 12:27:33,641 INFO [ckan.lib.base] /dataset/dataset-for-organization-my-sample-origanization/resource_edit/3e40b103-99b7-495a-ab37-9127174841dc render time 0.177 seconds
/usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py:79: 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.
sess._flush_warning("related attribute set")
2018-01-12 12:27:41,911 INFO [ckanext.datastore.backend.postgres] Making resource u'3e40b103-99b7-495a-ab37-9127174841dc' public
2018-01-12 12:27:41,937 INFO [ckanext.datastore.backend.postgres] Making resource u'76fd9ad5-9239-4069-95b8-bb9fb55c3d76' public
2018-01-12 12:27:42,008 INFO [ckan.lib.base] /dataset/dataset-for-organization-my-sample-origanization/resource_edit/3e40b103-99b7-495a-ab37-9127174841dc render time 0.714 seconds
2018-01-12 12:33:53,235 INFO [ckan.lib.base] /api/3/action/help_show render time 0.004 seconds
2018-01-12 12:36:28,867 INFO [ckan.lib.base] /datasstore/dump/76fd9ad5-9239-4069-95b8-bb9fb55c3d76 render time 0.008 seconds
2018-01-12 12:36:28,940 INFO [ckan.lib.base] /datasstore/dump/76fd9ad5-9239-4069-95b8-bb9fb55c3d76 render time 0.071 seconds
2018-01-12 12:36:37,213 INFO [ckan.lib.base] / render time 0.206 seconds
2018-01-12 12:36:54,390 INFO [ckan.lib.base] /dataset render time 0.122 seconds
2018-01-12 12:37:16,923 INFO [ckan.lib.base] /dataset render time 0.109 seconds
2018-01-12 12:37:20,288 INFO [ckan.lib.base] / render time 0.192 seconds
2018-01-12 12:37:23,866 INFO [ckan.lib.base] /dataset render time 0.129 seconds
"

i also have the same problem. anyone know how to fix it? i can't use DataStore for preview dataset anymore after upgrading CKAN from 2.7.3 to 2.8.0

It looks like 2.8 version has many issues. I meet this issue as well.

The original log messages (_resource_preview() has been deprecated) are not related to the DataPusher/DataStore not working.

Check https://github.com/ckan/ckan/issues/4330 to see if that is the issue you are having or if not, please create another issue with the relevant log messages.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LeonanCarvalho picture LeonanCarvalho  路  3Comments

Nimphal picture Nimphal  路  6Comments

debbielee1996 picture debbielee1996  路  5Comments

lperepol picture lperepol  路  8Comments

amercader picture amercader  路  4Comments