#34 Edit and Archive don't work

Crash
closed-fixed
nobody
Other (9)
5
2004-03-16
2004-03-08
Thomas Zajic
No

I have no idea whether this is an Edit/Archive bug or a ROX-Lib2 bug, but both applications fail to run for me:

[zlatko@disclosure]:~$ ~/Apps/Edit/AppRun
Traceback (most recent call last):
File "/home/zlatko/Apps/Edit/AppRun", line 31, in ?
import EditWindow
File "/home/zlatko/Apps/Edit/EditWindow.py", line 7, in ?
from rox.saving import Saveable
File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 12, in ?
from icon_theme import rox_theme
File "/usr/local/lib/ROX-Lib2/python/rox/icon_theme.py", line 91, in ?
rox_theme = IconTheme('ROX')
File "/usr/local/lib/ROX-Lib2/python/rox/icon_theme.py", line 62, in __init__
rox.report_exception()
File "/usr/local/lib/ROX-Lib2/python/rox/__init__.py", line 172, in report_exception
import debug
File "/usr/local/lib/ROX-Lib2/python/rox/debug.py", line 10, in ?
from saving import StringSaver
ImportError: cannot import name StringSaver

[zlatko@disclosure]:~$ ~/Apps/Archive/AppRun
Traceback (most recent call last):
File "/home/zlatko/Apps/Archive/AppRun", line 4, in ?
import sys, os, formats
File "/home/zlatko/Apps/Archive/formats.py", line 4, in ?
from support import PipeThroughCommand, escape, Tmp
File "/home/zlatko/Apps/Archive/support.py", line 3, in ?
from rox import g, saving
File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 12, in ?
from icon_theme import rox_theme
File "/usr/local/lib/ROX-Lib2/python/rox/icon_theme.py", line 91, in ?
rox_theme = IconTheme('ROX')
File "/usr/local/lib/ROX-Lib2/python/rox/icon_theme.py", line 62, in __init__
rox.report_exception()
File "/usr/local/lib/ROX-Lib2/python/rox/__init__.py", line 172, in report_exception
import debug
File "/usr/local/lib/ROX-Lib2/python/rox/debug.py", line 10, in ?
from saving import StringSaver
ImportError: cannot import name StringSaver
[zlatko@disclosure]:~$ /usr/local/lib/ROX-Lib2/

Running ROX-Lib2's AppRun doesn't produce any error messages and seems to work fine - screenshot attached. Installing ROX-Lib2 in ~/lib, /usr/local/lib or /usr/local/lib/python2.2/site-packages doesn't make any difference. Both applications are installed in /usr/local/apps, /usr/local/apps is symlinked to ~/Apps. Running them as /usr/local/apps/*/AppRun doesn't work, either. Other ROX applications work fine (ROX-Filer, MIME-Editor, Wallpaper), I don't know whether they actually use ROX-Lib2 or not, though.

Version information: Python-2.2.1, pygtk-2.0.0, Rox-Filer-2.1.1, ROX-Lib2-1.9.12, ROX-Edit-1.9.4, ROX-Archive-1.9.4.

Discussion

  • Thomas Zajic
    Thomas Zajic
    2004-03-08

    Logged In: YES
    user_id=150806

    Screenshot attachment didn't work.

     
  • Thomas Zajic
    Thomas Zajic
    2004-03-08

    ROX-Lib2 AppRun screenshot

     
    Attachments
  • Thomas Leonard
    Thomas Leonard
    2004-03-14

    Logged In: YES
    user_id=40461

    OK, well this is triggered by an error trying to load your
    icon theme, which isn't being reported correctly.

    Maybe there's something wrong with your 'ROX' theme. Have a
    look in ~/.icons.

    I'll fix the error in the error reporting...

    Thanks for the report!

     
  • Thomas Zajic
    Thomas Zajic
    2004-03-15

    Logged In: YES
    user_id=150806

    Okay, here's the contents of my ~/.icons directory - there's only one symlink pointing to the ROX subdirectory of ROX-Filer v2.1.1, containing ROX's standard MIME icons:

    [zlatko@disclosure]:~$ ls -l ~/.icons/
    total 0
    lrwxrwxrwx 1 zlatko users 30 Mr 15 07:10 ROX -> /usr/local/apps/ROX-Filer/ROX/
    [zlatko@disclosure]:~$ ls -l ~/.icons/ROX/
    total 8
    -rw-r--r-- 1 root root 139 Jn 25 17:17 index.theme
    drwxr-xr-x 2 root root 4096 Jn 25 17:17 MIME
    [zlatko@disclosure]:~$ cat ~/.icons/ROX/index.theme
    [Icon Theme]
    Name=ROX
    Comment=Default ROX icon theme
    Directories=MIME
    Example=inode:directory

    [MIME]
    Size=48
    Context=MimeTypes
    Type=Fixed
    [zlatko@disclosure]:~$

    If I delete the symlink, ~/Apps/Archive/AppRun starts fine (I get a popup dialog telling me how to create and extract archives), but all my MIME icons in ROX-Filer are gone then (I only get the standard GTK2 question mark icon for all file types other than directories). Edit still doesn't work, though, it comes up with a new error message:

    [zlatko@disclosure]:~$ ~/Apps/Edit/AppRun
    Traceback (most recent call last):
    File "/home/zlatko/Apps/Edit/AppRun", line 31, in ?
    import EditWindow
    File "/home/zlatko/Apps/Edit/EditWindow.py", line 37, in ?
    menu = Menu('main', [
    File "/usr/local/lib/ROX-Lib2/python/rox/Menu.py", line 99, in __init__
    ag.connect('accel_changed', keys_changed)
    TypeError: GtkAccelGroup.connect() takes exactly 4 arguments (2 given)
    [zlatko@disclosure]:~$

    This could be due to the fact that I upgraded to pygtk-2.2.0 recently - I'll downgrade back to pygtk-2.0.0 and see if that helps.

     
  • Thomas Zajic
    Thomas Zajic
    2004-03-15

    Logged In: YES
    user_id=150806

    Update: Edit also works fine with pygtk-2.0.0 if I remove the ~/.icons/ROX symlink - but then, of course, I don't get the proper icons in ROX-Filer. As a workaround/kludge, I found that both both Edit and ROX-Filer work fine (including proper icons) if I rename the ~/.icons/ROX symlink to something else, and make ROX-Filer use the new name as theme (in Options -> Types -> Icon theme) - but that's not the way it's supposed to work, I guess (although it's still acceptable, if there's no other proper solution).

    I have no idea what the problem is, the /usr/local/apps/ROX-Filer/ROX directory contains nothing but whatever rox-2.1.1 installs there, and I didn't edit the index.theme file after installation - do I need to edit/change something in there? Something else I stumbled across while looking for a possible solution is the freedesktop.org Basedir specification (http://www.freedesktop.org/Standards/basedir-spec), which might or might not be related to the problem at hand. Anyway, I'll include my settings here, just in case they're relevant:

    [zlatko@disclosure]:~$ set | grep XDG
    XDG_CACHE_HOME=/home/zlatko/.cache
    XDG_CONFIG_DIRS=/usr/local/etc/xdg:/etc/xdg
    XDG_CONFIG_HOME=/home/zlatko/.config
    XDG_DATA_DIRS=/usr/local/share/:/usr/share/
    XDG_DATA_HOME=/home/zlatko/.local/share

    So, there seem to be two independent problems:

    1. Edit doesn't work with pygtk-2.2.0.
    2. Archive/Edit and ROX-Filer obviously have different ideas about theme/icon handling.

    Any ideas?

     
  • Thomas Leonard
    Thomas Leonard
    2004-03-15

    Logged In: YES
    user_id=40461

    OK, could you try again with this new version of ROX-Lib2:

    http://rox.sourceforge.net/snapshots/

    That should fix the pygtk2.2 problem, and the error
    reporting problem.
    Then we should be able to find out what the theme problem is!!

    Thanks,

     
  • Thomas Zajic
    Thomas Zajic
    2004-03-15

    Logged In: YES
    user_id=150806

    I installed the ROX-Lib2 snapshot and upgraded to pygtk-2.2.0 again, and things look a bit brighter now. :-)

    Even with the old ~/.icons/ROX symlink in place, both Archive and Edit start fine now. If I only start and immediately quit both applications, there are no tracebacks on the console. So far, so good.

    Once I load a file into edit, modify it, then try to quit, or drag and drop a file, directory or archive onto Archiver, I get an error popup: "TypeError: strip() takes no arguments (1 given)". If I click OK, though, both apps continue to work fine - I'm able to create and extract archives with Archiver, and edit and save files with Edit just fine.

    If I click on Details (see attached screenshot), then on Bug Report, the following traceback gets dumped to the console:

    [zlatko@disclosure]:~$ ~/Apps/Edit/AppRun ~/tmp/0-GLIB-2.0
    Traceback (most recent call last):
    File "/home/zlatko/Apps/Edit/EditWindow.py", line 432, in close
    self.save(discard = 1)
    File "/home/zlatko/Apps/Edit/EditWindow.py", line 484, in save
    self.savebox = SaveBox(self, uri, 'text/plain', discard)
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 510, in __init__
    save_area = BoxedArea(document, uri, type)
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 224, in __init__
    drag_area = self._create_drag_area(type)
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 253, in _create_drag_area
    self._set_icon(type)
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 237, in _set_icon
    pixbuf = image_for_type(type)
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 36, in image_for_type
    from icon_theme import rox_theme
    File "/usr/local/lib/ROX-Lib2/python/rox/icon_theme.py", line 91, in ?
    rox_theme = IconTheme('ROX')
    File "/usr/local/lib/ROX-Lib2/python/rox/icon_theme.py", line 62, in __init__
    rox.report_exception()
    File "/usr/local/lib/ROX-Lib2/python/rox/__init__.py", line 173, in report_exception
    debug.show_exception(type, value, tb)
    File "/usr/local/lib/ROX-Lib2/python/rox/debug.py", line 66, in show_exception
    savebox = StringSaver(bug_report, 'BugReport')
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 564, in __init__
    SaveBox.__init__(self, self, name, 'text/plain')
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 510, in __init__
    save_area = BoxedArea(document, uri, type)
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 224, in __init__
    drag_area = self._create_drag_area(type)
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 253, in _create_drag_area
    self._set_icon(type)
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 237, in _set_icon
    pixbuf = image_for_type(type)
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 36, in image_for_type
    from icon_theme import rox_theme
    ImportError: cannot import name rox_theme

    Here I have to press Ctrl+C on the command line, there's no way to close Edit or the error popup and continue to work, I only get more tracebacks. If I do the same with Archive's error popup (Details -> Bug report), both Archive and the error popup close themselves after the following traceback, and I'm back at the command line:

    [zlatko@disclosure]:~$ ~/Apps/Archive/AppRun ~/tmp/0-GLIB-2.0
    Traceback (most recent call last):
    File "/home/zlatko/Apps/Archive/AppRun", line 27, in ?
    savebox = ArchiveBox()
    File "/home/zlatko/Apps/Archive/box.py", line 14, in __init__
    saving.SaveBox.__init__(self, self, '', 'text/plain')
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 510, in __init__
    save_area = BoxedArea(document, uri, type)
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 224, in __init__
    drag_area = self._create_drag_area(type)
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 253, in _create_drag_area
    self._set_icon(type)
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 237, in _set_icon
    pixbuf = image_for_type(type)
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 36, in image_for_type
    from icon_theme import rox_theme
    File "/usr/local/lib/ROX-Lib2/python/rox/icon_theme.py", line 91, in ?
    rox_theme = IconTheme('ROX')
    File "/usr/local/lib/ROX-Lib2/python/rox/icon_theme.py", line 62, in __init__
    rox.report_exception()
    File "/usr/local/lib/ROX-Lib2/python/rox/__init__.py", line 173, in report_exception
    debug.show_exception(type, value, tb)
    File "/usr/local/lib/ROX-Lib2/python/rox/debug.py", line 66, in show_exception
    savebox = StringSaver(bug_report, 'BugReport')
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 564, in __init__
    SaveBox.__init__(self, self, name, 'text/plain')
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 510, in __init__
    save_area = BoxedArea(document, uri, type)
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 224, in __init__
    drag_area = self._create_drag_area(type)
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 253, in _create_drag_area
    self._set_icon(type)
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 237, in _set_icon
    pixbuf = image_for_type(type)
    File "/usr/local/lib/ROX-Lib2/python/rox/saving.py", line 36, in image_for_type
    from icon_theme import rox_theme
    ImportError: cannot import name rox_theme
    [zlatko@disclosure]:~$

    Does this shed any light?

     
  • Thomas Zajic
    Thomas Zajic
    2004-03-15

    Error popup screenshot

     
    Attachments
  • Thomas Leonard
    Thomas Leonard
    2004-03-16

    Logged In: YES
    user_id=40461

    OK, that's very helpful. Looks like support for the extra
    strip argument was added in Python 2.2.2. I'll rewrite it to
    work on older versions.

     
  • Thomas Leonard
    Thomas Leonard
    2004-03-16

    • status: open --> closed-fixed
     
  • Thomas Leonard
    Thomas Leonard
    2004-03-16

    Logged In: YES
    user_id=40461

    Should be fixed in ROX-Lib 1.9.13. Please re-open if not...

     
  • Thomas Zajic
    Thomas Zajic
    2004-03-17

    Logged In: YES
    user_id=150806

    This is just to confirm that both Edit and Archive work fine now (ROX-Lib2-1.9.13, pygtk-2.2.0) - thanks! :-)