track number in filename causes error - 'int' object has no attribute in 'replace'

Bug #702065 reported by Willem on 2011-01-12
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rhythmbox Fileorganizer
Medium
Wolter Hellmund

Bug Description

I set the preferred file name format to '$track - $artist - $title' and this caused an error in the code. I am not familiar with Python, but it seems like a replace method is not defined for 'int'. Perhaps copy track as a string? The songs do have tracks defined in the tag information.

When run from the commandline, this is what happens:

Traceback (most recent call last):
  File "/home/willem/.gnome2/rhythmbox/plugins/fileorganizer/fileorganizer.py", line 74, in organize_selection
    self.organize (selection)
  File "/home/willem/.gnome2/rhythmbox/plugins/fileorganizer/fileorganizer.py", line 81, in organize
    item.relocate ()
  File "/home/willem/.gnome2/rhythmbox/plugins/fileorganizer/fileops.py", line 44, in relocate
    targetname = tools.datafiller (self, targetname)
  File "/home/willem/.gnome2/rhythmbox/plugins/fileorganizer/tools.py", line 24, in datafiller
    string = string.replace (('$'+key),process (file.get_metadata (key)))
  File "/home/willem/.gnome2/rhythmbox/plugins/fileorganizer/tools.py", line 31, in process
    string = string.replace ('/','_')
AttributeError: 'int' object has no attribute 'replace'

Wolter Hellmund (wolterh) wrote :

Hi, as you may have read on the overview, I am dropping the maintenance of this project. Nor that I have been very good at it lately. Nonetheless, I have fixed this bug - or attempted to. I added a line that accomplished what your suggestion pointed. I hope this works, please let me know.

PS: Even though I am dropping maintenance, it does not mean that I will attempt to fix bugs every now an then, like any other willing user.

Wolter Hellmund (wolterh) wrote :

will not*

Danke! I am going to try it right away.

Willem

On 11-01-12 08:36 PM, Wolter Hellmund wrote:
> Hi, as you may have read on the overview, I am dropping the maintenance
> of this project. Nor that I have been very good at it lately.
> Nonetheless, I have fixed this bug - or attempted to. I added a line
> that accomplished what your suggestion pointed. I hope this works,
> please let me know.
>
> PS: Even though I am dropping maintenance, it does not mean that I will
> attempt to fix bugs every now an then, like any other willing user.
>

Willem (withaar) wrote :

It works perfectly!

Wolter Hellmund (wolterh) wrote :

I'm glad I could help! Thanks for the bug report.

Changed in rb-fileorganizer:
assignee: nobody → Wolter Hellmund (wolterh)
importance: Undecided → Medium
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers