[Glade-users] Importing an old .glade file



Damon Chaplin ?rta:
On Sun, 2005-08-07 at 22:02 +0200, Zoltan Boszormenyi wrote:


$ libglade-convert --verbose myproject.glade
Fixing app1 up as GnomeApp
Fixing app1 up as GtkWindow
Fixing dock1 up as BonoboDock
Fixing dockitem1 up as BonoboDockItem
Fixing menubar1 up as GtkMenuBar
Fixing file1 up as GtkMenuItem
Fixing file1_menu up as GtkMenu
Fixing exit1 up as GtkImageMenuItem
Fixing exit1 up as GtkMenuItem
Fixing Traceback (most recent call last):
  File "/usr/bin/libglade-convert", line 1201, in ?
    main()
  File "/usr/bin/libglade-convert", line 1198, in main
    handle_file(args[0])
  File "/usr/bin/libglade-convert", line 1160, in handle_file
    fixup_widget(widgetdef)
  File "/usr/bin/libglade-convert", line 428, in fixup_widget
    fixup_widget(childdef.widget)
  File "/usr/bin/libglade-convert", line 428, in fixup_widget
    fixup_widget(childdef.widget)
  File "/usr/bin/libglade-convert", line 428, in fixup_widget
    fixup_widget(childdef.widget)
  File "/usr/bin/libglade-convert", line 428, in fixup_widget
    fixup_widget(childdef.widget)
  File "/usr/bin/libglade-convert", line 424, in fixup_widget
    while (type and not fixup_as_type (widget, type)):
  File "/usr/bin/libglade-convert", line 600, in fixup_as_type
    print >> sys.stderr, 'Fixing', widget['name'], 'up as', type
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in 
position 9: ordinal not in range(128)

And it doesn't get converted. System is Fedora Core 3/x86-64.
glade2-2.6.0, libglade2-2.4.0.


The error occurs in a debugging message. Try running it without the
"--verbose" flag. It may get further then.

If you have problems with other widgets you can try altering the
libglade-convert script, or removing the widget from the XML file.

Damon

Thanks, I was able to convert it finally. There may be a problem
in libglade-convert, though. Without the --verbose option, it writes
the converted .glade xml into the terminal without any errors.
However, when I tried to redirect it into a file, the file contained
almost only the Glade xml header and I got these errors:

**********************************************
widget convertwidget1 of class GtkList is broken.
widget convertwidget6 of class GtkList is broken.
widget convertwidget15 of class GtkList is broken.
widget convertwidget24 of class GtkList is broken.
widget convertwidget27 of class GtkList is broken.
widget convertwidget30 of class GtkList is broken.
widget convertwidget33 of class GtkList is broken.
widget convertwidget40 of class GtkList is broken.
widget convertwidget43 of class GtkList is broken.
widget convertwidget46 of class GtkList is broken.
widget convertwidget55 of class GtkList is broken.
widget convertwidget60 of class GtkList is broken.
widget convertwidget69 of class GtkList is broken.
widget convertwidget86 of class GtkList is broken.
widget convertwidget93 of class GtkList is broken.
widget convertwidget96 of class GtkList is broken.
widget convertwidget107 of class GtkList is broken.
widget convertwidget114 of class GtkList is broken.
widget convertwidget123 of class GtkList is broken.
widget convertwidget126 of class GtkList is broken.
widget convertwidget143 of class GtkList is broken.
widget convertwidget152 of class GtkList is broken.
widget convertwidget159 of class GtkList is broken.
widget convertwidget164 of class GtkList is broken.
widget convertwidget171 of class GtkList is broken.
widget convertwidget180 of class GtkList is broken.
widget convertwidget183 of class GtkList is broken.
widget convertwidget190 of class GtkList is broken.
widget convertwidget199 of class GtkList is broken.
widget convertwidget212 of class GtkList is broken.
widget convertwidget219 of class GtkList is broken.
widget convertwidget236 of class GtkList is broken.
widget convertwidget243 of class GtkList is broken.
widget convertwidget246 of class GtkList is broken.
widget convertwidget257 of class GtkList is broken.
widget convertwidget262 of class GtkList is broken.
widget convertwidget269 of class GtkList is broken.
widget convertwidget274 of class GtkList is broken.
widget convertwidget277 of class GtkList is broken.
widget convertwidget284 of class GtkList is broken.
widget convertwidget289 of class GtkList is broken.
widget convertwidget328 of class GtkList is broken.
Traceback (most recent call last):
   File "/usr/bin/libglade-convert", line 1201, in ?
     main()
   File "/usr/bin/libglade-convert", line 1198, in main
     handle_file(args[0])
   File "/usr/bin/libglade-convert", line 1175, in handle_file
     widgetdef.dump(indent)
   File "/usr/bin/libglade-convert", line 156, in dump
     print '%s  <property name="%s"%s>%s</property>' % \
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in 
position 47: ordinal not in range(128)
**********************************************

The .glade file is UTF-8 encoded already. Only this was in the

**********************************************
$ cat newproject.glade
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"; >

<glade-interface>
   <requires lib="gnome" />
   <requires lib="bonobo" />

   <widget class="GnomeApp" id="app1">
**********************************************

The workaround was to increase the number of lines stored in memory
in gnome-terminal to 50000 and run libglade-convert without redirection.
Then cut-and-paste the 37000+ lines into an editor. :-)

Best regards,
Zolt?n B?sz?rm?nyi



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]