GNOME Bugzilla – Bug 654847
AttributeError: 'NoneType' object has no attribute 'rfind'
Last modified: 2011-12-02 21:50:29 UTC
This issue was originally reported against the Fedora package of meld: https://bugzilla.redhat.com/show_bug.cgi?id=722622 This backtrace occurs when model.value_path(child, pane) returns None: backtrace: :posixpath.py:112:basename:AttributeError: 'NoneType' object has no attribute 'rfind' : :Traceback (most recent call last): : File "/usr/share/meld/meld/meldwindow.py", line 568, in on_file_changed : page.on_file_changed(filename) : File "/usr/share/meld/meld/dirdiff.py", line 1121, in on_file_changed : name = os.path.basename(model.value_path(child, pane)) : File "/usr/lib64/python2.7/posixpath.py", line 112, in basename : i = p.rfind('/') + 1 :AttributeError: 'NoneType' object has no attribute 'rfind' : :Local variables in innermost frame: :p: None This is quite reproducible on the command line, even if I don't know in which cases model.value_path returns None: % python -c 'import os; os.path.basename(None)' Traceback (most recent call last):
+ Trace 227801
i = p.rfind('/') + 1
An idea to resolve this issue would be to just call os.path.basename if model.value_path does not return None.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.