CKAN Dataset Page 500 Error Solution

 

Created on: 8/10/19
Last update: 8/10/19

Check the CKAN error log:

tail -f /var/log/apache2/ckan_default.error.log

Find the error like:

[Thu Jul 18 00:59:42.554478 2019] [wsgi:error] [pid 32569:tid 139839545399040] [remote 127.0.0.1:34041] Error - <class 'routes.util.GenerationException'>: url_for can only return a string, got unicode instead: aplicativo_read?action=read&controller=package&id=monitora-brasil
[Thu Jul 18 00:59:42.556110 2019] [wsgi:error] [pid 32569:tid 139839545399040] [remote 127.0.0.1:34041] URL: http://cloud.csiss.gmu.edu/dataset
[Thu Jul 18 00:59:42.556203 2019] [wsgi:error] [pid 32569:tid 139839545399040] [remote 127.0.0.1:34041] File '/usr/lib/ckan/default/lib/python2.7/site-packages/weberror/errormiddleware.py', line 171 in __call__

Determine the dataset ID, for example, monitora-brasil, then delete the dataset in http://localhost:5000/dataset/edit/monitora-brasil