Skip to content

UnboundLocalError: local variable 'error' referenced before assignment #19

@zim514

Description

@zim514

Hi

My addon has crash reporting and the crash below gets reported from time to time:

File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.simplecache/lib/simplecache.py" line 67 in get result = self._get_db_cache(endpoint, checksum, cur_time, json_data) File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.simplecache/lib/simplecache.py" line 136 in _get_db_cache cache_data = self._execute_sql(query, (endpoint,)) File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.simplecache/lib/simplecache.py" line 252 in _execute_sql [args] [locals] self._log_msg("_database ERROR ! -- %s" % str(error), xbmc.LOGWARNING) **UnboundLocalError: local variable 'error' referenced before assignment**

I had a quick look at the code and it looks like the log line might just be in the wrong place, but I don't understand it enough to offer a PR, nor which repo is the right one...

It doesn't seem to happen that frequently so it's probably not urgent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions