Package: gedit-latex-plugin
Version: 0.2rc1-2
Severity: important

Hi,
I tried to create a PDF file inside a directory that have accents in his name
but nothing happens. Examining the output from a console, I verified this
error message:

----->

Traceback (most recent call last):
  File "/usr/lib/gedit-2/plugins/GeditLaTeXPlugin/src/base/decorators.py", line 
271, in _on_action_activated
    action.activate(self._window_context)
  File "/usr/lib/gedit-2/plugins/GeditLaTeXPlugin/src/tools/__init__.py", line 
124, in activate
    self._runner.run(context.active_editor.file, self._tool, tool_view)
  File "/usr/lib/gedit-2/plugins/GeditLaTeXPlugin/src/tools/__init__.py", line 
162, in run
    chdir(file.dirname)
OSError: [Errno 2] Arquivo ou diretório não encontrado: 
'/home/marco/Repository/Mau%C3%A1/2009/ECM921/Aulas/Aula01'

----->

After a while I realized that the problem could be inside the file __init__.py,
located at the directory /usr/lib/gedit-2/plugins/GeditLaTeXPlugin/src/base.
Using urllib library and url2pathname() function seemed to solve it.

I'm sending a patch:

----->

--- __init_old__.py     2009-01-07 07:10:00.000000000 -0200
+++ __init__.py 2009-04-20 23:02:12.000000000 -0300
@@ -1008,7 +1008,7 @@
 from os import remove
 from os.path import splitext, basename, dirname, exists, getmtime
 from glob import glob
-
+from urllib import url2pathname
 
 class File(object):
        """
@@ -1025,8 +1025,7 @@
                """
                if uri is None:
                        raise ValueError("URI must not be None")
-               
-               self._uri = urlparse(uri)
+               self._uri = urlparse(url2pathname(uri))
                if len(self._uri.scheme) == 0:
                        self._uri = urlparse("%s%s" % (self._DEFAULT_SCHEME, 
uri))

----->

I hope it helps!
Marco.


-- System Information:
Debian Release: squeeze/sid
  APT prefers oldstable
  APT policy: (500, 'oldstable'), (500, 'unstable'), (500, 'testing'), (500, 
'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gedit-latex-plugin depends on:
ii  gedit                         2.24.3-1   official text editor of the GNOME 
ii  python                        2.5.4-2    An interactive high-level object-o
ii  python-dbus                   0.83.0-1   simple interprocess messaging syst
ii  python-support                1.0.2      automated rebuilding support for P
ii  rubber                        1.1-2.2    an automated system for building L

Versions of packages gedit-latex-plugin recommends:
pn  python-enchant             <none>        (no description available)
ii  texlive                    2007.dfsg.2-3 TeX Live: A decent selection of th

gedit-latex-plugin suggests no packages.

-- no debconf information



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to