After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 346328 - gnomevfs.get_file_info behaves strangely in python plugins
gnomevfs.get_file_info behaves strangely in python plugins
Status: RESOLVED OBSOLETE
Product: rhythmbox
Classification: Other
Component: Plugins (other)
HEAD
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-07-01 00:09 UTC by Adam Zimmerman
Modified: 2009-03-09 04:52 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14



Description Adam Zimmerman 2006-07-01 00:09:15 UTC
In python plugins, gnomevfs.get_file_info returns a FileInfo object without an mtime field (for http files). When the mtime field is accessed, python throws the following exception:

>>> info.mtime
Traceback (most recent call last):
  • File "/home/florian/devel_bin/lib/rhythmbox/plugins/pythonconsole.py", line 336 in __run
    r = eval(command, self.namespace, self.namespace)
  • File "<string>", line 0 in ?
ValueError: ntime field has no valid value

Note the reference to "ntime", as opposed to "mtime" in the exception message.

For a full description of the bug, see comments 9-24 of bug 345783. I can't reproduce it myself, however by comparing results of certain actions in the python interpreter, Florian Zeitz and I have been able to narrow down some of the conditions that cause it to appear on Florian's machine:

- it only appears when running the python code under rhythmbox (i.e. running python from the command line will not produce the bug, but running the same commands in the rhythmbox python console will)
- mtime(ntime?) and atime are the only fields that are affected as far as I am aware

The only difference in configurations that I've noticed is that Florian has rhythmbox installed in his home directory, while I have it packaged and installed in /usr. I don't see the bug, and he does.
Comment 1 James "Doc" Livingston 2006-07-11 10:16:03 UTC
mtime isn't guaranteed to be valid, as the http server may not send information about it, and any code should be prepared to handle that. I don't think this is really a bug.

The difference in behaviour may be due to things like proxies or other settings.
Comment 2 Jonathan Matthew 2007-08-10 14:28:58 UTC
I just noticed the 'ntime' thing while I was messing around with another plugin.  Turns out it's just a typo.  See bug 465404.
Comment 3 Jonathan Matthew 2009-03-09 04:52:32 UTC
gnome-vfs -> obsolete