On Wed, 07 Sep 2011 09:51:33 +0100
Chris Richardson wrote:
>
>
> I am having trouble getting the filedialog to work on linux, either
> with the ubuntu package (hangs), or building from source (SEGV).
>
> e.g.
>
> from visual.filedialog import get_file
> fd = get_file()
> data=fd.readlines()
> print data
> fd.close()
>
> This will generate a dialog box, but after selection, it hangs in the
> package version.
> When I build visual from source (5.71) - it gives a SEGV:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7fffe7fbc700 (LWP 26050)]
> 0x00007ffff46612b0 in Gtk::Window::get_position(int&, int&) const ()
> from /usr/lib/libgtkmm-2.4.so.1
>
> which is a call from src/gtk2/display.cpp in
> display::on_window_configure - probably trying to get the position of
> the (deleted) window...
>
> Any suggestions?
Typing the above in ipython here works on Fedora 15 with:
gtkmm24-2.24.0-3.fc15.x86_64
I'd say it's a problem in gtk so I'd file a bug against that in ubuntu.
_______________________
Here I had a problem with umlauts in filenames:
In [1]: from visual.filedialog import get_file
The Polygon module is not installed,
so the text and extrusion objects are unavailable.
The ttfquery and/or FontTools modules are not installed,
so the text object is unavailable.
In [2]: fd = get_file()
---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call
last) /home/tom/<ipython-input-2-7ff51f925835> in <module>()
----> 1 fd = get_file()
/usr/lib64/python2.7/site-packages/vis/filedialog.pyc in
get_file(file_extensions, x, y, title, mode, maxfiles) 26
file_extensions = [file_extensions] 27 return
filedialog(file_extensions=file_extensions, ---> 28
x=x, y=y, title=title, mode=mode, maxfiles=maxfiles) 29
30 def filedialog(file_extensions=None, x=100, y=100,
title="Open", mode='rU', maxfiles=20):
/usr/lib64/python2.7/site-packages/vis/filedialog.pyc in
filedialog(file_extensions, x, y, title, mode, maxfiles)
152 lcolor = filecolor 153 if f[1]: lcolor =
dircolor --> 154 labels[n].text = f[0]
155 labels[n].color = lcolor
156
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
12: ordinal not in range(128)
But when avoiding such directories, it works.
Greetings,
Tom
|