Thank you very much ufleisch. Unfortunately I tried to run the script and it returned these errors:
Code:
Traceback (most recent call last):
File "tag.py", line 4, in <module>
kid3 = dbus.SessionBus().get_object('net.sourceforge.kid3', '/Kid3')
File "/usr/lib/pymodules/python2.6/dbus/bus.py", line 244, in get_object
follow_name_owner_changes=follow_name_owner_changes)
File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 241, in __init__
self._named_service = conn.activate_name_owner(bus_name)
File "/usr/lib/pymodules/python2.6/dbus/bus.py", line 183, in activate_name_owner
self.start_service_by_name(bus_name)
File "/usr/lib/pymodules/python2.6/dbus/bus.py", line 281, in start_service_by_name
'su', (bus_name, flags)))
File "/usr/lib/pymodules/python2.6/dbus/connection.py", line 620, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name net.sourceforge.kid3 was not provided by any .service files
I did some searching around, and found and downloaded a kid3 RPM file, and placed net.sourceforge.kid3.xml into /usr/share/dbus-1/interfaces/ . At first the script seemed to be working, no errors were thrown. Then I went in and saw that no tags had actually changed in the file, then with some debug statements I realized the script wasn't able to open the file, because I only specified file.mp3 as an argument versus /home/dbutabi/Python/file.mp3 . So then I went and tried it again with the correct filepath and got this:
Code:
Traceback (most recent call last):
File "tag.py", line 27, in <module>
set_tags_in_file(sys.argv[1])
File "tag.py", line 11, in set_tags_in_file
artist = kid3.getFrame(2, 'Artist')
File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 140, in __call__
**keywords)
File "/usr/lib/pymodules/python2.6/dbus/connection.py", line 620, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
I realized that I had had kid3 open with file.mp3 open this whole time, so I closed it and tried to run the script again and now I keep getting that same error that I got at first. I don't know how to fix it, any help would be greatly appreciated
Bookmarks