Ticket #2398 (closed defect: fixed)

Opened 2 years ago

Last modified 4 months ago

[windows only] IOError: Bad URL: file|///H|/Songs/Un%20Homme%20et%20Une%20Femme%20OST/Un_Homme_et_Une_Femme_OST_back.jpg

Reported by: nk Owned by: asterix
Priority: normal Milestone: 0.12
Component: chat Version: svn
Severity: normal Keywords:
Cc: OS: All

Description

strange.. it used to work when I commited it many months ago. drag from Windows Exploer and drop in CHAT:

Traceback (most recent call last):
  File "C:\Documents and Settings\Administrator\Desktop\gajim\src\chat_control.py", line 1554, in _on_drag_data_received
    path = helpers.get_file_path_from_dnd_dropped_uri(uri)
  File "C:\Documents and Settings\Administrator\Desktop\gajim\src\common\helpers.py", line 445, in get_file_path_from_dnd_dropped_uri
    path = urllib.url2pathname(uri) # escape special chars
  File "C:\Python24\lib\nturl2path.py", line 26, in url2pathname
    raise IOError, error
IOError: Bad URL: file|///H|/Songs/Un%20Homme%20et%20Une%20Femme%20OST/Un_Homme_et_Une_Femme_OST_back.jpg

Attachments

patch (0.6 kB) - added by nk 2 years ago.
untested stuff (I don't have pygtk running in windows for python25!). when I can test and fix, I must also update http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq23.031.htp

Change History

Changed 2 years ago by nk

I must check what happens if we drop many files to make sure it stills

works as it used to (both in windows and in gnome). Yann please test at XFCE.

Changed 2 years ago by nk

untested stuff (I don't have pygtk running in windows for python25!). when I can test and fix, I must also update http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq23.031.htp

Changed 2 years ago by nk

  • status changed from new to closed

strange, can't repro anymore. yeah though! :)

Changed 8 months ago by campey

  • status changed from closed to reopened
  • resolution invalid deleted
  • os set to All

Getting this under XP on SVN 9242. GTK+ 2.10.11, PyGTK 2.10.3. Will try updating GTK and see if that fixes.

Traceback (most recent call last):
  File "C:\Projects\Gajim\gajim-svn\src\chat_control.py", line 1910, in _on_drag_data_received
    path = helpers.get_file_path_from_dnd_dropped_uri(uri)
  File "C:\Projects\Gajim\gajim-svn\src\common\helpers.py", line 503, in get_file_path_from_dnd_dropped_uri
    path = urllib.url2pathname(uri) # escape special chars
  File "C:\Progs\Python24\lib\nturl2path.py", line 26, in url2pathname
    raise IOError, error
IOError: Bad URL: file|///C|/firefox-ssl.JPG

Changed 8 months ago by anonymous

It seems my nturl2path is broken. This happens on both my Py 2.4.3 and Py 2.5.

nturl2path.url2pathname('file:///C:/')

Traceback (most recent call last):
  File "<pyshell#8>", line 1, in -toplevel-
    nturl2path.url2pathname('file:///C:/')
  File "C:\Progs\Python24\lib\nturl2path.py", line 26, in url2pathname
    raise IOError, error
IOError: Bad URL: file|///C|/

and

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    nturl2path.url2pathname('file:///C:/')
  File "C:\Progs\Python25\lib\nturl2path.py", line 26, in url2pathname
    raise IOError, error
IOError: Bad URL: file|///C|/

Confusing, I don't know if this is a bug with the nturl2pathname or the way we're trying to use it.

Changed 4 months ago by js

  • status changed from reopened to closed
  • resolution set to fixed
  • milestone changed from 0.11 to 0.12

(In [9610]) Fix DnD FT on Windows: * Fix helpers.py so URL is decoded correctly. * Fix code in roster_window.py so the \0 that's alway the last file

on win32 is ignored.

This also fixes and closes #2398.

Add/Change #2398 ([windows only] IOError: Bad URL: file|///H|/Songs/Un%20Homme%20et%20Une%20Femme%20OST/Un_Homme_et_Une_Femme_OST_back.jpg)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.