[mythtv-users] Problem deleting recordings with find_orphans.py NameError: global name 'NoneType' is not defined
Eric Sharkey
eric at lisaneric.org
Fri Aug 26 13:55:06 UTC 2011
On Thu, Aug 25, 2011 at 4:47 PM, Raymond Wagner <raymond at wagnerrp.com> wrote:
> On Thu, 25 Aug 2011 16:18:23 -0400, Eric Sharkey <eric at lisaneric.org>
>> implies that doing "except NoneType" is just broken python. I'm not
>> experienced enough in python to judge.
>
> Yeah, not entirely sure what I was thinking with that as the exception
> type.
Do I need to file a ticket for that, or will you just fix that part?
> However that just allows the program to fault back to the option
> menu and refresh its list, rather than completely terminate. I wouldn't
> explain why those database entries marked as orphaned aren't getting
> deleted by the backend.
When I run the script, I see these messages in the backend log:
2011-08-26 09:43:25.812 MainServer::ANN Monitor
2011-08-26 09:43:25.815 adding: mythtered as a client (events: 2)
2011-08-26 09:43:45.649 ProgramInfo(6254_20110823003000.mpg), Error:
GetPlaybackURL: '6254_20110823003000.mpg' should be local, but it can
not be found.
2011-08-26 09:43:45.681 Reschedule requested for id 0.
2011-08-26 09:43:45.689 ProgramInfo(6252_20110822123000.mpg), Error:
GetPlaybackURL: '6252_20110822123000.mpg' should be local, but it can
not be found.
2011-08-26 09:43:46.058 ProgramInfo(7738_20110824153000.mpg), Error:
GetPlaybackURL: '7738_20110824153000.mpg' should be local, but it can
not be found.
2011-08-26 09:43:46.073 ProgramInfo(6024_20110824143000.mpg), Error:
GetPlaybackURL: '6024_20110824143000.mpg' should be local, but it can
not be found.
[.. many similar lines ..]
2011-08-26 09:43:48.662 Error deleting
'GetPlaybackURL/UNABLE/TO/FIND/LOCAL/FILE/ON/mythtered/6254_20110823003000.mpg':
No such file or directory
2011-08-26 09:43:54.697 Error deleting
'GetPlaybackURL/UNABLE/TO/FIND/LOCAL/FILE/ON/mythtered/6252_20110822123000.mpg':
No such file or directory
2011-08-26 09:44:08.976 MainServer, Warning: Unknown socket closing
MythSocket(0x7fa4941928f0)
2011-08-26 09:44:10.900 MythSocket(7fa4941928f0:-1): writeStringList:
Error, No data written on writeBlock (1 errors)
2011-08-26 09:44:11.180 ProgramInfo(7738_20110824153000.mpg), Error:
GetPlaybackURL: '7738_20110824153000.mpg' should be local, but it can
not be found.
2011-08-26 09:44:11.182 ProgramInfo(6024_20110824143000.mpg), Error:
GetPlaybackURL: '6024_20110824143000.mpg' should be local, but it can
not be found.
[.. many similar lines ..]
and the script exits with:
Traceback (most recent call last):
File "/usr/local/bin/find_orphans.py", line 230, in <module>
main()
File "/usr/local/bin/find_orphans.py", line 214, in main
opt[1](opt[2])
File "/usr/local/bin/find_orphans.py", line 136, in delete_recs
name = u'{0.hostname}: {0.title}'.format(self)
NameError: global name 'self' is not defined
and if I restart it, the number of recordings with missing files has
changed from 224 to 222.
Eric
More information about the mythtv-users
mailing list