Can't use rgedit in karmic

Help
2010-01-31
2013-04-05
  • Hello,

    I've tried to use rgedit in ubuntu karmic. I was able to install the plugin so that I can see the "R" button in gedit.
    But it is not possible to run any script from gedit. All the run-functions are coloured grey and can't be selected.
    Do you have any suggestions how I can fix that?

    Best regards
    Johannes

     
  • Dan Dediu
    Dan Dediu
    2010-02-01

    Hi,

    I suppose you have the "default" settings in rgedit? If so, you have in "R" -> "Configure R Interface" -> "Start R console automatically when gedit starts?" unchecked, which means that there will be no R console sutostarted when gedit fires up. This saves gedit start-up time and some memory as I assumed that not every time gedit is opened this is done to do some R :)
    You have basically two choices:
    1. check this option and everytime gedit starts you will have an R consle ready, or
    2. leave it unchecked and instead use the "+R" button in the toolbar and/or the "R" -> "Create new R workspace tab…" menu to create a new R console.
    After any of these you should have all R command enabled and everything should work.
    Plase, let me know if this workd for you.
    Best,
    Dan

     
  • Hello,

    Unfortunatly that didn't work.
    I am able to open R tabs but I can't run scripts.
    I've tried to embed a screenshot of my situation but I didn't manage to do so. Is there a possibility that I can send you the screenshot?

    Best regards
    Johannes

     
  • Dan Dediu
    Dan Dediu
    2010-02-02

    Is the R console/tab working by itself? If so, is it just the capacity to send text from gedit to R which is broken?
    Could you please start gedit from a command prompt, hopefully there will be some error messages/exceptions thrown out as you try to use rgedit?
    Best,
    Dan

     
  • Kasper Tofte
    Kasper Tofte
    2010-02-03

    Hi
    I have the same problem. The R-console it self is working, but I am not able to send commands to the console. I am able to make a new R tab, and define blocks. I started gedit from a command prompt, and got the following:

    ~$ gedit
    2010-02-02 23:53:56,510 DEBUG resources - Initializing resource locating
    2010-02-02 23:53:56,617 DEBUG Preferences - <value key='BibtexExtensions'> not found
    2010-02-02 23:53:56,636 DEBUG JobManager - Created JobManager instance 155857004
    2010-02-02 23:53:56,641 DEBUG GeditLaTeXPlugin - activate
    2010-02-02 23:53:56,644 DEBUG WindowContext - init
    2010-02-02 23:53:56,712 DEBUG GeditWindowDecorator - _init_tab_decorators: initialized 0 decorators
    2010-02-02 23:53:56,737 DEBUG GeditWindowDecorator - active_tab_changed
    2010-02-02 23:53:56,737 DEBUG GeditWindowDecorator - ------- ADJUST: None
    2010-02-02 23:53:56,739 DEBUG GeditWindowDecorator - No window-scope views for this extension
    2010-02-02 23:53:56,740 DEBUG GeditWindowDecorator - _set_selected_bottom_view: 1
    2010-02-02 23:53:56,740 DEBUG GeditWindowDecorator - _set_selected_side_view: 0
    2010-02-02 23:53:56,744 DEBUG GeditWindowDecorator - tab_added
    2010-02-02 23:54:08,730 DEBUG ToolView - init
    Traceback (most recent call last):
      File "/home/kasper/.gnome2/gedit/plugins/RCtrl.py", line 1523, in on_create_new_R_tab
        self.createRGeditTerminal()
      File "/home/kasper/.gnome2/gedit/plugins/RCtrl.py", line 1226, in createRGeditTerminal
        self.R_widget.send_command("source(\""+self._plugin.prefs+"\",echo=T,print.eval=T,max.deparse.length=500000,local=T);\n") # run the autostart script…
    TypeError: cannot concatenate 'str' and 'NoneType' objects
    2010-02-02 23:59:34,115 DEBUG GeditWindowDecorator - tab_removed
    2010-02-02 23:59:34,164 DEBUG GeditLaTeXPlugin - deactivate

    Note that I have the same problem with my LaTeXPlugin.

    Best,
    Kasper

     
  • Kasper Tofte
    Kasper Tofte
    2010-02-03

    Search a bit more, and got my LaTeX plugin to work by installing the rubber package, but it didn't help on my R plugin problem.

     
  • Dan Dediu
    Dan Dediu
    2010-02-03

    Hi kaspertofte,

    there seems to be something fishy there; could you please look in your RCtrl.py file (in the ~/.gnome2/gedit/plugins/ directory) an post the line 1226? From the output it looks odd, as it should have been:

                self.R_widget.send_command("source(\""+self._plugin.prefs+"\",echo=T,print.eval=T,max.deparse.length=500000,local=T);\n") # run the autostart script…

    and in your output the  after prefs seems to be missing…

    Thanks,
    Dab

     
  • Hi,

    I've started gedit from the terminal and got the following lines:

    (gedit:2984): EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported

    Traceback (most recent call last):
      File "/home/johannes/.gnome2/gedit/plugins/RCtrl.py", line 1821, in activate
        self._instances = RCtrlWindowHelper(self, window)
      File "/home/johannes/.gnome2/gedit/plugins/RCtrl.py", line 787, in __init__
        self._insert_menu()
      File "/home/johannes/.gnome2/gedit/plugins/RCtrl.py", line 1167, in _insert_menu
        self.createRGeditTerminal()
      File "/home/johannes/.gnome2/gedit/plugins/RCtrl.py", line 1226, in createRGeditTerminal
        self.R_widget.send_command("source(\""+self._plugin.prefs+"\",echo=T,print.eval=T,max.deparse.length=500000,local=T);\n") # run the autostart script…
    TypeError: cannot concatenate 'str' and 'NoneType' objects
    Traceback (most recent call last):
      File "/home/johannes/.gnome2/gedit/plugins/RCtrl.py", line 1831, in update_ui
        self._instances.update_ui()
    KeyError: <gedit.Window object at 0x92f611c (GeditWindow at 0x8e01098)>
    Traceback (most recent call last):
      File "/home/johannes/.gnome2/gedit/plugins/RCtrl.py", line 1831, in update_ui
        self._instances.update_ui()
    KeyError: <gedit.Window object at 0x92f611c (GeditWindow at 0x8e01098)>
    Traceback (most recent call last):
      File "/home/johannes/.gnome2/gedit/plugins/RCtrl.py", line 1525, in on_create_new_R_tab
        self.R_widget.create_new_R_tab()
      File "/home/johannes/.gnome2/gedit/plugins/RCtrl.py", line 435, in create_new_R_tab
        self._vte2.feed_child("source(\""+self._plugin.prefs+"\",echo=T,print.eval=T,max.deparse.length=500000,local=T);\n") # run the autostart script…
    TypeError: cannot concatenate 'str' and 'NoneType' objects

     
  • Dan Dediu
    Dan Dediu
    2010-02-03

    Hi guys,

    it looks like there is a problem with the new autorun R script at startup, but I can't see why! Do you have the latest version of rgedit? I suppose so… And did you also overwrite the old RCtrl.preferences file with the new one as well?
    And did you change the Autorun script options in the Options Dialog by any chance? If so, did you enable it? And where does your script point to?

    Dan

     
  • Dan Dediu
    Dan Dediu
    2010-02-03

    Hi guys (again)!

    I think I fixed it! For some reason, self.prefs was set to None and it would crash the program later (I would expect it to be a true path). Now, I fixed that by checking if it is None and, if so, do not attempt to autorun the start-up script :)

    Could you please test it before I upload it? To do so,please insert the following 4 lines (please, keep the indent!)

            # Checks:
            if self.prefs == None:
                self.prefs = False

    in RCtrl.py at line 1808 (after "pass:" and before "def get_data_dir(self):")? And could you let me know if it fixed the thing?

    Dan

     
  • Dan Dediu
    Dan Dediu
    2010-02-03

    Bugger! It lost the formatting! I'll try again:

            # Checks:
            if self.prefs['autostart_R_script_path'] == None:
                self.prefs['autostart_R_script'] = False
    
     
  • Dan Dediu
    Dan Dediu
    2010-02-03

    it messes up with the code; I'll e-mail you with it…

     
  • Now it works! Perfect!
    Thanks a lot for your help.
    I have to say I really appreciate the work you have done.
    This is exactly the tool I was looking for.

    Best regards,
    Johannes

     
  • Dan Dediu
    Dan Dediu
    2010-02-03

    I'm glad it did! I'll upload a bugfix release shortly…
    Thanks for the testing and the bug report,
    Dan

     
  • Kasper Tofte
    Kasper Tofte
    2010-02-04

    It works for me to. Thank you so much for this script, I have really been looking for something like this.

    \\Kasper

     
  • pjotr
    pjotr
    2010-08-20

    Hi, I think I might be having a similar problem to that of the OP, although being a total linux novice, Im not certain.
    Im running Ubuntu 10.04 LTS and would like to use rgedit.
    Ive downloaded version 0.7.0.4 of rgedit and tried to install it.
    First of all, I dont seem to have a ~/.gnome2/gedit/plugins folder to install the plugin. Looking on the gnome live website
    http://live.gnome.org/Gedit/Plugins
    ive instead copied the plugins into /usr/lib/gedit-2/plugins/
    Now I have the option to load the R plugin. When I do that, I can open open an R workspace tab and R runs just fine.

    Weirdly though, I cannot configure the plugin (neither in the gedit preferences dialogue, nor in the menu under R -> configure R interface). The functions are colored white (not grey) but simply dont produce a response when I click on them.

    Finally, since I tried deleting and recopying the files into the above folder, I noticed that my gedit preferences must be stored somewhere, since gedit automatically loads the plugin each time. However, searching around, I could not find (as indicated in your readme file) a folder called ~/.rgedit-preferences.

    I suspect that my question has more to do with my lack of understanding linux than with anything else.

    In any case, help greatly appreciated.

    Sebastian

     
  • pjotr
    pjotr
    2010-08-20

    Let me make an addition:

    the following entries in the R menu work:
    run current line through R
    run selection through R
    run whole file through R

    run block 1 through R
    define block 1

    run block 2 through R
    define block 2

    create new R workspace tab
    close R console

    insert landmark comment

    the following entries dont work
    attach/detach R console
    wizards
    show/hide toolbar (indeed there is no toolbar)
    configure R interface
    check for updates
    help
    about

    cheers

    Sebastian

     
  • Dan Dediu
    Dan Dediu
    2010-08-20

    Hi Sebastian,

    strange! Hmm… I wonder if it has anything to do with you putting the plugin in a global location where I suppose your normal user doesn't have write access…

    Could you try to actually *create* the folder ~/.gnome2/gedit/plugins (using mkdir or nautilus) and then copy the rgedit into this newly created folder (but please first delete it from that global position in /usr/lib/gedit-2/plugins/). Please let me know what happens now…

    Best,
    Dan

     
  • stephan
    stephan
    2011-09-06

    hello,

    i encouter a problem using the plugin and  ubuntu 10.4 lucid lynx.
    i installed the pulgin and i can start R out of gedit but i cannot send a single line (similar to the prob of kayote).
    if i start gedit from the termina i receive the following message:

    howHideLine
        if checkmenuitem.get_active() and self._plugin.show_gedit_UI:
    AttributeError: 'RCtrlPlugin' object has no attribute 'show_gedit_UI'
    Traceback (most recent call last):
      File "/home/stephan/.gnome2/gedit/plugins/RCtrl.py", line 2565, in activate
        self._instances[window] = RCtrlWindowHelper(self, window)
      File "/home/stephan/.gnome2/gedit/plugins/RCtrl.py", line 1111, in __init__
        self._insert_menu()
      File "/home/stephan/.gnome2/gedit/plugins/RCtrl.py", line 1472, in _insert_menu
        self.on_toggle_ShowHideLine(ShowHideLine)
      File "/home/stephan/.gnome2/gedit/plugins/RCtrl.py", line 2239, in on_toggle_ShowHideLine
        if checkmenuitem.get_active() and self._plugin.show_gedit_UI:
    AttributeError: 'RCtrlPlugin' object has no attribute 'show_gedit_UI'
    Traceback (most recent call last):
      File "/home/stephan/.gnome2/gedit/plugins/RCtrl.py", line 2677, in update_ui
        self._instances[window].update_ui()
    KeyError: <gedit.Window object at 0x878a75c (GeditWindow at 0x82f6000)>
    Traceback (most recent call last):
      File "/home/stephan/.gnome2/gedit/plugins/RCtrl.py", line 2677, in update_ui
        self._instances[window].update_ui()
    KeyError: <gedit.Window object at 0x878a75c (GeditWindow at 0x82f6000)>[code]
    thanks in advance
    stephan
    
     
  • Dan Dediu
    Dan Dediu
    2011-12-12

    Hi stephan,

    do you still have this problem?

    Dan