[ckan-dev] Increasing log verbosity for certain errors

Stefan Oderbolz stefan.oderbolz at liip.ch
Thu Oct 26 09:34:55 UTC 2017


Hi Alex,

you have multiple options, depending on where the error occurs:

- if you configured the error mails, you might get a pretty decent error
log including a trace by mail
- if the error happens in the frontend, I would try to run CKAN with
"paster serve" and enable the debug mode, then you get a good idea of where
the error is as well
- the last option is to actually print the trace yourself (by using
try/except), here the python package "traceback" is very handy (
https://docs.python.org/2/library/traceback.html) e.g.

import traceback
try:
    # some code raising an exception
except Exception, e:
    print "An error occured: %r" % e
    traceback.print_exc()
    # or if you are using a logger
    log.exception("An error occured: %r, %s" % (e, traceback.format_exc()))


Hope this helps.

- Stefan

On Thu, Oct 26, 2017 at 11:26 AM, Alex Corbi <a.corbi at gmail.com> wrote:

> Dear all,
>
> I have a quick question regarding how to increase the verbosity of certain
> error logs that I am getting after upgrading from ckan 2.3 to 2.7. In
> different parts of the system I get errors like:
>
> Error - <type 'exceptions.TypeError'>: string indices must be integers
>
> or
>
> WebApp Error: <type 'exceptions.ValueError'>: invalid literal for int()
> with base 10: ''
>
> While I do understand what the errors can be about, I cannot manage to
> identify where they are originated because I do not get any stack-trace or
> additional information to identify their origin.
>
> Has somebody found him/herself in such a situation? any hints on how to
> move forward? I am hitting the wall since a couple of days.
>
> Much grateful for your potential help,
>
> Alex
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>


-- 
Liip AG  // Limmatstrasse 183 //  CH-8005 Zürich
Tel +41 43 500 39 80 // GnuPG 0x7B588C67 // www.liip.ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20171026/79133fdd/attachment-0003.html>


More information about the ckan-dev mailing list