UnboundLocalError: local variable 'database' referenced before assignment

Bug #812883 reported by Kain88
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scribes
New
Undecided
Unassigned

Bug Description

I have a rather annoying problem with scribes on Natty. I can't use search and replace or show white spaces. I will also
get an error if I try to manipulate the window. Below is a

if I try to resize/move/close/focus scribes I get the following error message

Traceback (most recent call last):
  File "/usr/lib/scribes/GenericPlugins/FocusLastDocument/DatabaseWriter.py", line 19, in __write
    set_value(self.__editor.uri)
  File "/usr/lib/scribes/GenericPlugins/FocusLastDocument/Metadata.py", line 21, in set_value
    database.close()
UnboundLocalError: local variable 'database' referenced before assignment

alt+<period> gives me this error

Traceback (most recent call last):
  File "/usr/lib/scribes/GenericPlugins/DrawWhitespace/Trigger.py", line 36, in __activate_cb
    set_value(value)
  File "/usr/lib/scribes/GenericPlugins/DrawWhitespace/Metadata.py", line 16, in set_value
    storage[KEY] = value
  File "/usr/lib/pymodules/python2.7/SCRIBES/filedict.py", line 81, in __setitem__
    self.__setitem(key, value)
  File "/usr/lib/pymodules/python2.7/SCRIBES/filedict.py", line 76, in __setitem
    %self.__tablename, (hash(key), key_pickle, value_pickle) )
sqlite3.OperationalError: attempt to write a readonly database

ctrl+f gives me this
Traceback (most recent call last):
  File "/usr/lib/scribes/GenericPlugins/SearchSystem/Trigger.py", line 47, in __activate_cb
    if not self.__manager: self.__manager = self.__get_manager()
  File "/usr/lib/scribes/GenericPlugins/SearchSystem/Trigger.py", line 44, in __get_manager
    return Manager(self.__editor)
  File "/usr/lib/scribes/GenericPlugins/SearchSystem/Manager.py", line 79, in __init__
    Colorer(self, editor)
  File "/usr/lib/scribes/GenericPlugins/SearchSystem/MatchColorer.py", line 4, in __init__
    self.__init_attributes(manager, editor)
  File "/usr/lib/scribes/GenericPlugins/SearchSystem/MatchColorer.py", line 14, in __init_attributes
    self.__tag = self.__create_tag()
  File "/usr/lib/scribes/GenericPlugins/SearchSystem/MatchColorer.py", line 31, in __create_tag
    self.__editor.textbuffer.get_tag_table().add(tag)
ValueError: A tag named 'find_tag' is already in the tag table

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
kain88@x200:Desktop$ scribes -i
kain88@x200:Desktop$ ========================================================
System Info: ('Linux', 'x200', '2.6.38-10-generic', '#46-Ubuntu SMP Tue Jun 28 15:07:17 UTC 2011', 'x86_64')
Python Version: 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
[GCC 4.5.2]
System Byteorder: little
Python Modules: ('__builtin__', '__main__', '_ast', '_bisect', '_codecs', '_collections', '_functools', '_hashlib', '_locale', '_random', '_socket', '_sre', '_ssl', '_struct', '_symtable', '_warnings', '_weakref', 'array', 'binascii', 'cPickle', 'cStringIO', 'cmath', 'errno', 'exceptions', 'fcntl', 'gc', 'grp', 'imp', 'itertools', 'marshal', 'math', 'operator', 'posix', 'pwd', 'select', 'signal', 'spwd', 'strop', 'sys', 'syslog', 'thread', 'time', 'unicodedata', 'xxsubtype', 'zipimport', 'zlib')
========================================================
Scribes Version: 0.4-dev-build954
Dbus Version: (0, 83, 1)
GTK+ Version: (2, 24, 4)
PyGTK Version: (2, 22, 0)
Psyco Not Installed
========================================================
Running Instance: 1
========================================================
Python Path: /usr/lib/python2.7/dist-packages
Plugin Path: /usr/lib/scribes/GenericPlugins
Data Path: /usr/share/scribes
Executable Path: /usr/bin
========================================================

Kain88 (karjan)
description: updated
Revision history for this message
Mystilleef (mystilleef) wrote :

Backup ~/.config/scribes.

Remove ~/.config/scribes

Restart scribes.

See if it solves the problem.

Also install the latest version of Scribes via the PPA. You may need to remove the current version and reinstall again.

Thanks.

Revision history for this message
Kain88 (karjan) wrote :

Thanks that solved it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.