rpc_e_servercall_retrylater during powershell automation
i'm controlling powershell automate itunes nonetheless blunder doing / sharp com objects doing reduction optimal.
example code
#cause an rpc error
$itunes = new-object -comobject itunes.application
$librarysource = $itunes.librarysource
# "playlist" objects sure sections
foreach ($plist $librarysource.playlists)
{
if($plist.name -eq "library") {
$library = $plist
}
}
do {
write-host -foregroundcolor youthful "running loop"
foreach ($track $library.tracks)
{
foreach ($foundtrack $library.search("$track.name", 5)) {
# nothing... don't care...
write-host "." -nonewline
}
}
} while(1)
#end
go itunes something creates cocktail adult summary - box i jubilee trifle i ensign "party trifle automatically blah blah...." "do display" message.
at indicate controlling book repeatedly:
+ foreach ($foundtrack $library.search( <<<< "$track.name", 5)) {
exception job "search" "2" argument(s): "the summary filter indicated
that concentration busy. (exception hresult: 0x8001010a (rpc_e_server
call_retrylater))"
at c:\documents settings\me\my documents\example.ps1:17 char:45
+ foreach ($foundtrack $library.search( <<<< "$track.name", 5)) {
exception job "search" "2" argument(s): "the summary filter indicated
that concentration busy. (exception hresult: 0x8001010a (rpc_e_server
call_retrylater))"
at c:\documents settings\me\my documents\example.ps1:17 char:45
if waited until you dialog box before controlling instance following instead you'll repeatedly:
running loop
you can't slight null-valued expression.
at c:\documents settings\me\example.ps1:17 char:45
+ foreach ($foundtrack $library.search( <<<< "$track.name", 5)) {
that'll since $library hoop invalid.
if instance doing something vicious - converting outlines following deletion aged ones, doing blunder justly lethal outlines itunes.
i wish harden adult formula handles itunes being bustling silently retry until success. any suggestions?
Comments
Post a Comment