Fix replace_files #188

Closed
opened 2023-10-19 10:47:08 +01:00 by kae · 1 comment
Owner
CRITICAL:root:  File "/home/kae/mm/app/replace_files.py", line 261, in <module>
    main()
  File "/home/kae/mm/app/replace_files.py", line 144, in main
    process_track(new_path, old_file, new_title, new_artist, bitrate)
  File "/home/kae/mm/app/replace_files.py", line 258, in process_track
    set_track_metadata(session, track)


File "/home/kae/mm/app/replace_files.py", line 261, in <module>
    257          # Update track metadata
    258          set_track_metadata(session, track)
    259  
    260  
--> 261  main()

File "/home/kae/mm/app/replace_files.py", line 144, in main
    39   def main():
 (...)
    140                  print(f"                      → {new_artist}")
    141                  print()
    142                  data = input("Go ahead (y to accept)? ")
    143                  if data == "y":
--> 144                      process_track(new_path, old_file, new_title, new_artist, bitrate)
    145                      continue
    ..................................................
     data = 'y'
     new_path = '/home/kae/music/Singles/tmp/Holding Back The Years - Franti
                 c Elevators.mp3'
     old_file = '/home/kae/music/Singles/Holding back the years - The Franti
                 c Elevators.mp3'
     new_title = 'Holding Back The Years'
     new_artist = 'Frantic Elevators'
     bitrate = 320
    ..................................................

File "/home/kae/mm/app/replace_files.py", line 258, in process_track
    229  def process_track(src, dst, title, artist, bitrate):
 (...)
    254          os.unlink(dst)
    255          shutil.move(src, new_path)
    256  
    257          # Update track metadata
--> 258          set_track_metadata(session, track)
    ..................................................
     src = '/home/kae/music/Singles/tmp/Holding Back The Years - Franti
            c Elevators.mp3'
     dst = '/home/kae/music/Singles/Holding back the years - The Franti
            c Elevators.mp3'
     title = 'Holding Back The Years'
     artist = 'Frantic Elevators'
     bitrate = 320
     shutil.move = <function 'move' shutil.py:783>
     new_path = '/home/kae/music/Singles/Holding Back The Years - Frantic El
                 evators.mp3'
     track = <Track(id=6333, title=Holding back the years, artist=The Fra
              ntic Elevators, path=/home/kae/music/Singles/Holding Back Th
              e Years - Frantic Elevators.mp3>
    ..................................................

---- (full traceback above) ----
File "/home/kae/mm/app/replace_files.py", line 261, in <module>
    main()
File "/home/kae/mm/app/replace_files.py", line 144, in main
    process_track(new_path, old_file, new_title, new_artist, bitrate)
File "/home/kae/mm/app/replace_files.py", line 258, in process_track
    set_track_metadata(session, track)

TypeError: set_track_metadata() takes 1 positional argument but 2 were given
``` CRITICAL:root: File "/home/kae/mm/app/replace_files.py", line 261, in <module> main() File "/home/kae/mm/app/replace_files.py", line 144, in main process_track(new_path, old_file, new_title, new_artist, bitrate) File "/home/kae/mm/app/replace_files.py", line 258, in process_track set_track_metadata(session, track) File "/home/kae/mm/app/replace_files.py", line 261, in <module> 257 # Update track metadata 258 set_track_metadata(session, track) 259 260 --> 261 main() File "/home/kae/mm/app/replace_files.py", line 144, in main 39 def main(): (...) 140 print(f" → {new_artist}") 141 print() 142 data = input("Go ahead (y to accept)? ") 143 if data == "y": --> 144 process_track(new_path, old_file, new_title, new_artist, bitrate) 145 continue .................................................. data = 'y' new_path = '/home/kae/music/Singles/tmp/Holding Back The Years - Franti c Elevators.mp3' old_file = '/home/kae/music/Singles/Holding back the years - The Franti c Elevators.mp3' new_title = 'Holding Back The Years' new_artist = 'Frantic Elevators' bitrate = 320 .................................................. File "/home/kae/mm/app/replace_files.py", line 258, in process_track 229 def process_track(src, dst, title, artist, bitrate): (...) 254 os.unlink(dst) 255 shutil.move(src, new_path) 256 257 # Update track metadata --> 258 set_track_metadata(session, track) .................................................. src = '/home/kae/music/Singles/tmp/Holding Back The Years - Franti c Elevators.mp3' dst = '/home/kae/music/Singles/Holding back the years - The Franti c Elevators.mp3' title = 'Holding Back The Years' artist = 'Frantic Elevators' bitrate = 320 shutil.move = <function 'move' shutil.py:783> new_path = '/home/kae/music/Singles/Holding Back The Years - Frantic El evators.mp3' track = <Track(id=6333, title=Holding back the years, artist=The Fra ntic Elevators, path=/home/kae/music/Singles/Holding Back Th e Years - Frantic Elevators.mp3> .................................................. ---- (full traceback above) ---- File "/home/kae/mm/app/replace_files.py", line 261, in <module> main() File "/home/kae/mm/app/replace_files.py", line 144, in main process_track(new_path, old_file, new_title, new_artist, bitrate) File "/home/kae/mm/app/replace_files.py", line 258, in process_track set_track_metadata(session, track) TypeError: set_track_metadata() takes 1 positional argument but 2 were given ```
kae added the
bug
Priority
labels 2023-10-19 10:47:08 +01:00
Author
Owner
48d26d8
kae closed this issue 2023-10-19 15:17:44 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kae/musicmuster#188
No description provided.