Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#42 Exception in 'New Latex Document' dialog

v0.2
closed-fixed
Wizards (8)
9
2009-02-04
2009-01-23
Anonymous
No

I get no code completion with the gedit latex 0.2 rc1 release. No errors are printed when I open gedit from the terminal, and start editing a tex file.

Discussion

    • priority: 5 --> 9
     
  • Hi,

    this seems to be a duplicate of [ 2523591 ] but I can't reproduce it. Can you please do the following:
    * edit YOUR_GEDIT_PLUGIN_DIR/GeditLaTeXPlugin/src/__init__.py and change the logging level from logging.WARN to logging.DEBUG
    * run gedit from a console again
    * post the output here

    Thanks a lot!

    Michael

     
  • Hi Michael,
    Here's what I get when I just generically run gedit:

    DEBUG:resources:Initializing resource locating
    DEBUG:WindowContext:init
    DEBUG:GeditWindowDecorator:_init_tab_decorators: initialized 0 decorators
    DEBUG:GeditWindowDecorator:active_tab_changed
    DEBUG:GeditWindowDecorator:---------- ADJUST: None
    DEBUG:GeditWindowDecorator:No window-scope views for this extension
    DEBUG:GeditWindowDecorator:_set_selected_bottom_view: 0
    DEBUG:GeditWindowDecorator:_set_selected_side_view: 0
    DEBUG:GeditWindowDecorator:tab_added
    DEBUG:ToolView:init

    Here's what I get when I run "gedit not_working_file.tex" for a .tex file which I made before using gedit and do not get any toolbars, etc. for:

    DEBUG:resources:Initializing resource locating
    DEBUG:WindowContext:init
    DEBUG:GeditWindowDecorator:_init_tab_decorators: initialized 0 decorators
    DEBUG:GeditWindowDecorator:active_tab_changed
    DEBUG:GeditWindowDecorator:---------- ADJUST: None
    DEBUG:GeditWindowDecorator:No window-scope views for this extension
    DEBUG:GeditWindowDecorator:_set_selected_bottom_view: 0
    DEBUG:GeditWindowDecorator:_set_selected_side_view: 0
    DEBUG:GeditWindowDecorator:tab_added
    DEBUG:GeditTabDecorator:loaded
    DEBUG:GeditTabDecorator:---------- _adjust_editor: URI has changed
    DEBUG:LaTeXCompletionHandler:init
    DEBUG:LanguageModelFactory:Pickled object found: /home/at/.gnome2/gedit/plugins/GeditLaTeXPlugin/latex.pkl
    DEBUG:CompletionDistributor:init
    DEBUG:WindowContext:Created view LaTeXOutlineView
    DEBUG:WindowContext:Created view IssueView
    DEBUG:LaTeXEditor:init(file:///home/at/not_working_document.tex)
    DEBUG:LaTeXEditor:__parse
    DEBUG:IssueView:init
    DEBUG:LaTeXEditor:Parsed 11602 bytes of content
    Traceback (most recent call last):
    File "/home/at/.gnome2/gedit/plugins/GeditLaTeXPlugin/src/base/decorators.py", line 621, in _on_load
    self._adjust_editor()
    File "/home/at/.gnome2/gedit/plugins/GeditLaTeXPlugin/src/base/decorators.py", line 673, in _adjust_editor
    editor_class.__init__(self._editor, self, file)
    File "/home/at/.gnome2/gedit/plugins/GeditLaTeXPlugin/src/base/__init__.py", line 358, in __init__
    self.init(file, self._window_context)
    File "/home/at/.gnome2/gedit/plugins/GeditLaTeXPlugin/src/latex/editor.py", line 100, in init
    self.__parse()
    File "/home/at/.gnome2/gedit/plugins/GeditLaTeXPlugin/src/latex/editor.py", line 261, in __parse
    self._outline = self._outline_generator.generate(self._document, self)
    File "/home/at/.gnome2/gedit/plugins/GeditLaTeXPlugin/src/latex/outline.py", line 116, in generate
    self._walk(documentNode)
    File "/home/at/.gnome2/gedit/plugins/GeditLaTeXPlugin/src/latex/outline.py", line 212, in _walk
    name = str(node.firstOfType(Node.MANDATORY_ARGUMENT)[0])[1:] # remove "\"
    File "/home/at/.gnome2/gedit/plugins/GeditLaTeXPlugin/src/latex/parser.py", line 59, in firstOfType
    raise IndexError
    IndexError
    DEBUG:ToolView:init

    And here's what I get when I run "gedit working_file.tex" for a .tex file I first made while using gedit with your plugin and which does open up with all of the toolbars:

    DEBUG:resources:Initializing resource locating
    DEBUG:WindowContext:init
    DEBUG:GeditWindowDecorator:_init_tab_decorators: initialized 0 decorators
    DEBUG:GeditWindowDecorator:active_tab_changed
    DEBUG:GeditWindowDecorator:---------- ADJUST: None
    DEBUG:GeditWindowDecorator:No window-scope views for this extension
    DEBUG:GeditWindowDecorator:_set_selected_bottom_view: 0
    DEBUG:GeditWindowDecorator:_set_selected_side_view: 0
    DEBUG:GeditWindowDecorator:tab_added
    DEBUG:GeditTabDecorator:loaded
    DEBUG:GeditTabDecorator:---------- _adjust_editor: URI has changed
    DEBUG:LaTeXCompletionHandler:init
    DEBUG:LanguageModelFactory:Pickled object found: /home/at/.gnome2/gedit/plugins/GeditLaTeXPlugin/latex.pkl
    DEBUG:CompletionDistributor:init
    DEBUG:WindowContext:Created view LaTeXOutlineView
    DEBUG:WindowContext:Created view IssueView
    DEBUG:LaTeXEditor:init(file:///home/at/working_document.tex)
    DEBUG:LaTeXEditor:__parse
    DEBUG:IssueView:init
    DEBUG:LaTeXEditor:Parsed 200 bytes of content
    DEBUG:LaTeXOutlineView:init
    DEBUG:LaTeXValidator:validate
    DEBUG:LanguageModel:set_newcommands:
    DEBUG:GeditWindowDecorator:---------- ADJUST: .tex
    DEBUG:GeditWindowDecorator:_set_selected_bottom_view: 0
    DEBUG:GeditWindowDecorator:_set_selected_side_view: 0
    DEBUG:ToolView:init

    Thanks! -Alex

     
  • Here's the requested output. Please let me know if you need additional information.
    ___________________________________________________________________________________
    $ gedit latex8.tex
    DEBUG:resources:Initializing resource locating
    DEBUG:WindowContext:init
    DEBUG:GeditWindowDecorator:_init_tab_decorators: initialized 0 decorators
    DEBUG:GeditWindowDecorator:active_tab_changed
    DEBUG:GeditWindowDecorator:---------- ADJUST: None
    DEBUG:GeditWindowDecorator:No window-scope views for this extension
    DEBUG:GeditWindowDecorator:_set_selected_bottom_view: 0
    DEBUG:GeditWindowDecorator:_set_selected_side_view: 0
    DEBUG:GeditWindowDecorator:tab_added
    DEBUG:GeditTabDecorator:loaded
    DEBUG:GeditTabDecorator:---------- _adjust_editor: URI has changed
    DEBUG:LaTeXCompletionHandler:init
    DEBUG:LanguageModelFactory:Pickled object found: /home/john/.gnome2/gedit/plugins/GeditLaTeXPlugin/latex.pkl
    DEBUG:CompletionDistributor:init
    DEBUG:WindowContext:Created view LaTeXOutlineView
    DEBUG:WindowContext:Created view IssueView
    DEBUG:LaTeXEditor:init(file:///home/john/test/latex8.tex)
    DEBUG:LaTeXEditor:__parse
    DEBUG:IssueView:init
    DEBUG:LaTeXEditor:Parsed 25795 bytes of content
    DEBUG:LaTeXOutlineView:init
    DEBUG:LaTeXValidator:validate
    DEBUG:LanguageModel:set_newcommands: argmin,argmax
    DEBUG:BibTeXDocumentCache:Cache fault for 'file:///home/john/test/latex8.bib'
    DEBUG:GeditWindowDecorator:---------- ADJUST: .tex
    DEBUG:GeditWindowDecorator:_set_selected_bottom_view: 0
    DEBUG:GeditWindowDecorator:_set_selected_side_view: 0
    DEBUG:ToolView:init
    ___________________________________________________________________________________

     
  • Oh and I should note that I am opening existing tex files. They were not created with "New Latex Document". When I try to create a document with "New Latex Document" sometimes the dialog does not pop up. Here's what I see when that happens:
    ___________________________________________________________________________________________________
    $ gedit
    DEBUG:resources:Initializing resource locating
    DEBUG:WindowContext:init
    DEBUG:GeditWindowDecorator:_init_tab_decorators: initialized 0 decorators
    DEBUG:GeditWindowDecorator:active_tab_changed
    DEBUG:GeditWindowDecorator:---------- ADJUST: None
    DEBUG:GeditWindowDecorator:No window-scope views for this extension
    DEBUG:GeditWindowDecorator:_set_selected_bottom_view: 0
    DEBUG:GeditWindowDecorator:_set_selected_side_view: 0
    DEBUG:GeditWindowDecorator:tab_added
    DEBUG:ToolView:init
    /home/john/.gnome2/gedit/plugins/GeditLaTeXPlugin/src/util.py:172: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
    self.__tree = glade.XML(self.filename)
    DEBUG:Environment:Found user pw entry: ('john', 'x', 1000, 1000, 'John Doe,,,', '/home/john', '/bin/bash')
    WARNING:Preferences:<value key='RecentAuthor'> not found
    Traceback (most recent call last):
    File "/home/john/.gnome2/gedit/plugins/GeditLaTeXPlugin/src/base/decorators.py", line 271, in _on_action_activated
    action.activate(self._window_context)
    File "/home/john/.gnome2/gedit/plugins/GeditLaTeXPlugin/src/latex/actions.py", line 84, in activate
    if self._dialog.run() == 1:
    File "/home/john/.gnome2/gedit/plugins/GeditLaTeXPlugin/src/latex/dialogs.py", line 391, in run
    dialog = self.get_dialog()
    File "/home/john/.gnome2/gedit/plugins/GeditLaTeXPlugin/src/latex/dialogs.py", line 248, in get_dialog
    self._proxy_paper_size.restore("")
    File "/home/john/.gnome2/gedit/plugins/GeditLaTeXPlugin/src/latex/dialogs.py", line 98, in restore
    self._widget.set_active(restored_index)
    UnboundLocalError: local variable 'restored_index' referenced before assignment
    ___________________________________________________________________________________________________

     
    • labels: 1149275 --> Wizards
    • milestone: --> v0.2
    • summary: No code completion in 0.2 rc1 --> Exception in 'New Latex Document' dialog
     
  • Yes I can confirm that code completion now works with the latest SVN revision :D

     
  • Fixed in SVN

    Michael

     
    • status: open --> closed-fixed