Opened 14 years ago

Closed 14 years ago

Last modified 8 years ago

#4022 closed defect (worksforme)

MythArchive fails to eject the DVD drive after burn, then fails

Reported by: anonymous Owned by: paulh
Priority: minor Milestone: unknown
Component: mytharchive Version: 0.20-fixes
Severity: medium Keywords:
Cc: Ticket locked: no


Using Fedora 7 and the stable RPMS from, I get the following error at the end of the MythArchive? process:

Traceback (most recent call last):

File "/usr/share/mythtv/mytharchive/scripts/", line 3642, in <module>


File "/usr/share/mythtv/mytharchive/scripts/", line 3482, in processJob


File "/usr/share/mythtv/mytharchive/scripts/", line 1536, in BurnDVDISO

r = ioctl(f,CDROMEJECT, 0)

IOError: [Errno 5] Input/output error

The burn is fine, but this error causes the archive process to fail. If I comment out the following starting at line 1534 in

# eject the burned disc f =, os.O_RDONLY | os.O_NONBLOCK) r = ioctl(f,CDROMEJECT, 0) os.close(f)

the process finishes as expected.

Change History (4)

comment:1 Changed 14 years ago by paulh

Resolution: worksforme
Status: newclosed

Not sure why it's not working for you it could be that something is locking the tray which is why it can't be ejected. Are you using something that polls your cdrom drives looking for a disk that is locking the drive tray?

You could try adding a call to unlock the tray like this before the CDROMEJECT call

ioctl(f, CDROM_LOCKDOOR, 0)

you'll have to also add at the top of the script


or just replace that code with a call to the 'eject' command line tool.

I'm going to mark this as worksforme as I believe this is a setup issue not a problem with the script.

comment:2 Changed 14 years ago by paulh

I'm going to mark this as worksforme as I believe this is a setup issue not a problem with the script.

Actually forget that it looks like a problem with the media monitor locking the drive. The fix until a better way is found is to disable the media monitor. In current svn from trunk just turning of the setting to monitor removable media doesn't work you also have to add the drive to the list of drives to ignore. For my own sanity I always have the media monitor disabled which is why I haven't seen this problem myself.

comment:4 Changed 8 years ago by Stefan Brackertz <t.brackertz@…>

In bf10280b5fcb90b4a011e656a863e551665881fc/mythtv: fix ejecting the DVD on some systems and file encoding fixes

Fixes #10535. Refs #4022.

Signed-off-by: Paul Harrison <pharrison@…>

Note: See TracTickets for help on using tickets.