Zim

Fwd: [abrt] Zim-0.56-3.fc17: fs.py:539:_parse_uri:AssertionError: Can not handle non-local file uris

Bug #1072551 reported by Robin Lee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zim
Fix Released
Undecided
Unassigned

Bug Description

https://bugzilla.redhat.com/show_bug.cgi?id=870138

Description of problem:
- Write the following: file://path/to/file (I really had this, but I guess it will work with any path that does not exist on the system)
- Zim will automatically create a link a file
- Click on that link (with right click the error occurs, too)

Expected:
left click: error message "The file could not be found" or so
right click: context menu with at least the option the remove the link

Version-Release number of selected component:
Zim-0.56-3.fc17

Additional info:
libreport version: 2.0.16
abrt_version: 2.0.16
cmdline: /usr/bin/python /usr/bin/zim
kernel: 3.6.2-4.fc17.x86_64

backtrace:
:fs.py:539:_parse_uri:AssertionError: Can not handle non-local file uris
:
:Traceback (most recent call last):
: File "/usr/lib/python2.7/site-packages/zim/gui/pageview.py", line 5039, in do_populate_popup
: file = self.ui.notebook.resolve_file(file, self.page)
: File "/usr/lib/python2.7/site-packages/zim/notebook.py", line 1810, in resolve_file
: return File(filename)
: File "/usr/lib/python2.7/site-packages/zim/fs.py", line 1232, in __init__
: FilePath.__init__(self, path)
: File "/usr/lib/python2.7/site-packages/zim/fs.py", line 511, in __init__
: path = self._parse_uri(path)
: File "/usr/lib/python2.7/site-packages/zim/fs.py", line 539, in _parse_uri
: elif uri.startswith('file://'): assert False, 'Can not handle non-local file uris'
:AssertionError: Can not handle non-local file uris
:
:Local variables in innermost frame:
:uri: u'file://path/to/file'

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 1072551] [NEW] Fwd: [abrt] Zim-0.56-3.fc17: fs.py:539:_parse_uri:AssertionError: Can not handle non-local file uris

Behavior is indeed a bug. But be aware that file uris need to start either
with "file://localhost" or "file:///" to exist on the local file system at
all.

On Mon, Oct 29, 2012 at 5:43 AM, Robin Lee <email address hidden> wrote:

> Public bug reported:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=870138
>
> Description of problem:
> - Write the following: file://path/to/file (I really had this, but I guess
> it will work with any path that does not exist on the system)
> - Zim will automatically create a link a file
> - Click on that link (with right click the error occurs, too)
>
> Expected:
> left click: error message "The file could not be found" or so
> right click: context menu with at least the option the remove the link
>
>
> Version-Release number of selected component:
> Zim-0.56-3.fc17
>
> Additional info:
> libreport version: 2.0.16
> abrt_version: 2.0.16
> cmdline: /usr/bin/python /usr/bin/zim
> kernel: 3.6.2-4.fc17.x86_64
>
> backtrace:
> :fs.py:539:_parse_uri:AssertionError: Can not handle non-local file uris
> :
> :Traceback (most recent call last):
> : File "/usr/lib/python2.7/site-packages/zim/gui/pageview.py", line 5039,
> in do_populate_popup
> : file = self.ui.notebook.resolve_file(file, self.page)
> : File "/usr/lib/python2.7/site-packages/zim/notebook.py", line 1810, in
> resolve_file
> : return File(filename)
> : File "/usr/lib/python2.7/site-packages/zim/fs.py", line 1232, in
> __init__
> : FilePath.__init__(self, path)
> : File "/usr/lib/python2.7/site-packages/zim/fs.py", line 511, in __init__
> : path = self._parse_uri(path)
> : File "/usr/lib/python2.7/site-packages/zim/fs.py", line 539, in
> _parse_uri
> : elif uri.startswith('file://'): assert False, 'Can not handle
> non-local file uris'
> :AssertionError: Can not handle non-local file uris
> :
> :Local variables in innermost frame:
> :uri: u'file://path/to/file'
>
> ** Affects: zim
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to Zim.
> https://bugs.launchpad.net/bugs/1072551
>
> Title:
> Fwd: [abrt] Zim-0.56-3.fc17: fs.py:539:_parse_uri:AssertionError: Can
> not handle non-local file uris
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/zim/+bug/1072551/+subscriptions
>

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Fixed in rev610. Will now consistently interpret file://foo/bar as a link to a share drive

Unfortunately you do not always get an error message when clicked, can also fail silently - e.g. on my Ubuntu install this command goes to gvfs-open which fails without returning an error code to zim :(

Changed in zim:
status: New → Fix Committed
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Fix released in zim 0.58

Changed in zim:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.