Can't interpret error message from applescript

I've got a simple little applescript that is supposed to trash the currently playing song in iTunes (see below).
It used to work just fine.
Now i get this error message:
The track could not be deleted. iTunes got an error: some track of current playlist whose database ID of it = 3805 doesn't understand the delete message.
I have no idea what could have caused this.
Any ideas? hints? suggestions?
Best regards,
Gabriel.
--- the applescript:
-- Original is from http://www.dougscripts.com/itunes/
-- Modified by me, GZ, 2006
-- Deletes currently played track from the current playlist and from the library.
-- Also, moves the file to the Trash.
-- Finally, starts playing the next track.
-- Displays info message very briefly if iTunes is front window.
-- Doesn't do anything, if no track is playing.
-- Put this script into ~/Library/iTunes/Scripts.
-- Optionally, assign keyboard shortcut with:
-- System Preferences -> Keyboard -> Keyboard Shortcuts -> "+" at bottom of list
-- then select iTunes, type the name of this script exactly as it appears in iTunes' Script menu,
-- then type the key combo for it.
global addenda
set addenda to ""
tell application "iTunes"
if player state is not playing then
set addenda to "No track is playing."
else
set ofi to fixed indexing
set fixed indexing to true
try
set dbid to database ID of current track
set floc to (get location of current track)
-- goto next track before deleting current track
next track
-- set trackn to (get track of current playlist whose database ID is dbid)
-- display dialog "trackn = " & (trackn as string) buttons {"OK"} default button 1
delete (some track of current playlist whose database ID is dbid)
delete (some track of library playlist 1 whose database ID is dbid)
set addenda to "removed"
if floc is not missing value then
set my addenda to "trashed"
my deletethefile(floc)
end if
on error errmesg
set addenda to "The track could not be deleted." & return & errmesg
end try
set fixed indexing to ofi
end if
-- if frontmost then
if addenda = "removed" or addenda = "trashed" then
set showtime to 2
else
set showtime to 5
end if
if addenda = "removed" or addenda = "trashed" then
display dialog "Done. The track has been " & addenda & "." buttons {"Thanks"} default button 1 with icon 1 giving up after showtime
else
display dialog addenda buttons {"OK"} default button 1 with icon 1 giving up after showtime
do shell script "logger -i -t TrashCurrentTrack " & quoted form of addenda
end if
end tell
to deletethefile(floc)
try
tell application "Finder" to delete floc
on error
set addenda to "Done. However, the file could not be moved to the Trash."
try
tell application "Finder" to open container of floc
end try
end try
end deletethefile

delete (some track of current playlist whose
database ID is dbid)
If iTunes is NOT playing , current playlist has no
i did check for iTunes not playing right at the beginning of my script.
However, i think it must have something to do with the playlist that is currently on. If the track is selected in the "recently added" playlist or in "library" then i get the error essage. If it is selected in the playlist "podcasts", everything is fine.
I also did this in my script,
return (some track of library playlist 1 whose database ID is dbid)
and this does actually exhibit a problem, because i get as output "" !
How is that?
Best regards,
Gabriel.

Similar Messages

  • Where can get IDOC Error Message from Data base tables

    Hi ,
    i am automating idoc  checking process,in which i am getting control record from EDIDC tables,now i need to fetch Error message
    using this idoc no.
    How can fetch   error message text ?
    Thanks in advance.
    Regards
    sarath

    Hi its a structure, it doesnt store data.
    Take it from the table specified,
    Pass STAMID,STAMNO,STAPA1,STAPA2,STAPA3,STAPA4 to function module MESSAGE_PREPARE and you will get the message text.
    Also check the function module IDOC_READ_COMPLETELY

  • I am unable to print PDF's using either Adobe Reader or Safari. In Adobe Reader, I get an error message from my Cannon printer that says, "/usr.libexec/cups/filter/pstocupsraster failed". In Safari, I can only print the first page of a PDF.

    To try to resolve this problem, I have done the following actions.
    1 - I have run Disk Warrior.
    2 - I have repaired permissions.
    3 - I have deleted all plist that are either Cannon or Adobe.
    4 - I have downloaded and installed the lastest versions of Adobe Reader and the Cannon printer drivers.
    I am still unable to print PDF's.
    In Safari, I can print only the first page. In a multipage PDF, Safari only seems to recognize the first page.
    In Adobe Reader, I get an error message from my printer: "/usr/libexec/cups/filter/pstocupsraster failed".
    Any help would be greatly appreicated!

    Quit Safari.
    Open the Library folder in your home folder as follows:
    ☞ If running OS X 10.7 or later, hold down the option key and select Go ▹ Library from the Finder menu bar.
    ☞ If running an older version of OS X, select Go ▹ Go to Folder… from the Finder menu bar and copy the line below into the text box that opens:
    ~/Library
    Delete the following items from the Library folder:
    Caches/com.apple.Safari/Cache.db
    Preferences/com.apple.quicktime.plugin.preferences.plist
    Preferences/QuickTime Preferences
    Relaunch Safari and test.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ If you’re running OS X 10.7 or later, open LaunchPad. Click Utilities, then Console in the page that opens.
    Select "/var/log/cups/error_log" from the file list. Post the messages from the time of the last printing attempt.
    Post the log text, please, not a screenshot. If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.

  • I've recently received an error message from Time Machine that my Macbook Pro's sparsebundle is in use.  What is this and what can I do about it?

    I've recently received an error message from Time Machine that my Macbook Pro's sparsebundle is in use.  What is this and what can I do about it?

    This is asked at least 5-6 times a day here.
    Look at the right hand column.. more like this.
    It is a bug in Mountain Lion.
    Read C12 http://pondini.org/TM/Troubleshooting.html
    But the fast solution.. unplug the TC.. count to 10.. plug it back in.

  • How can i dispaly an Error Message from Server Side To form

    Hi All,
    How can i dispaly an Error Message from Server Side To form side .
    i try several ways nothing succed.
    i put the error in stack and after call the procedure from form i added
    Qms$Trans_Errors.Display_Messages;
    and because it is an error not informantional error the error screen displayed and enter
    in infinite loop acts like flashing .
    can any one help me please i use C/S Headstart6i and Designer 6i
    thanks alot
    radi

    hi,
    thanks alot lauri.
    yr code work only using information message but in error message its still the same .
    the error window still flash and enter in infinite loop of executeing the same triggers.
    thanks again
    radi

  • How can I Fetch the error message from a OAF page

    Hi,
    A confirmation message is coming on the page,I want to catch the error message and depending on its value want to add some validation.
    Is that possible to fetch the error message from the page?

    is it a confirmation message or an error message ?
    Code in the OAF page would be raising an OAException with a message name defined in message dictionary.
    you would need to look at the code to understand where this is thrown from and add your validation there.
    Tapash

  • Error message from the source system, Caller 09 contains an error message.

    Hi,
        Guru's, i got an error massage when my process chain is running(Daily) in BIW 7.0, the error got in Data Loading from source to PSA or data targets. The errors having the below details
    Error message from the source system
    Diagnosis
    An error occurred in the source system.
    System Response
    Caller 09 contains an error message.
    Further analysis:
    The error occurred in Extractor .
    Refer to the error message.
    Procedure
    How you remove the error depends on the error message.
    Note
    If the source system is a Client Workstation, then it is possible that the file that you wanted to load was being edited at the time of the data request. Make sure that the file is in the specified directory, that it is not being processed at the moment, and restart the request.   "
    Can any body help me out of this situation what to do and how to resolv ethe problem.
    Thanks and Regards,.
    Taps....

    Caller 09 is a very common issue - please search the forums before posting....
    Arun

  • Error message from source system

    Hi All,
    We have an infocube and ods which is being loaded from another ods. This is included in a process chain.
    In the process chain the Infopackage execution step has failed. When I right click and go for display messages, I found the following message in Messages tab:
    Error message from the source system
    Diagnosis
    An error occurred in the source system.
    System response
    Caller 09 contains an error message.
    Further analysis:
    The error occurred in Extractor .
    Refer to the error message.
    Procedure
    How you remove the error depends on the error message.
    Note
    If the source system is a Client Workstation, then it is possible that the file that you wanted to load was being edited at the time of the data request. Make sure that the file is in the specified directory, that it is not being processed at the
    And in Indiv Messages tab,
    Delta upload is only possible after successful initialization.
    Errors in source system.
    I tried to update the data targets from the initial ODS manualy but in vain.
    Any Help is awarded with points.
    Thanks
    AP

    Hi,
      Goto Info pack -> on menu bar select scheduler -> select init options for source system -> one request with green status -> select it and  click on delete symbol , it will delete the init. you can cross verify this in the base ODS where you dint find data mart status(after refresh). now  select init delta process under that select init without data transfer and schedule the load it will update one record and init flag to your source ODS.
    Note: if the last request is not updated from soruce ods to targets for that also you will find data mart status for this select the particular data mart -> click on delete symbol it will delete for the particular request (if it is updated to target it will not allow you to delete) then do delta load it will update the request which is not loaded from source ods to next targets.
    Regards
    Sankar

  • Error message from ABAP to BW portal

    Hi
    I need to write error message from ABAP to BW portal.
    If I write as usual: message E001(ZBW).
    Then I get a dump in portal.
    Does anyone know how to post error message in this case?
    Thanks.

    Hi,
    You need to use the function module RRMS_MESSAGE_HANDLING to post any kind of messages in the report output/web template or portal.
    You can pass the values trough the below parameters:
                  I_CLASS  = 'ZBW'
                  I_TYPE   = 'W'
                  I_NUMBER = '006'
    Regards,
    Shilpa

  • Error message from Application Server

    Hi All,
    Is it possible to capture a descriptive error message from the Application server when we try to transfer a file from SAP and it does not get written to the application server.
    I know it is possible to catch the standard catchable runtime exceptions, but I also would like to know if the file transfer fails in any other conditions which do not result in runtime dumps, nevertheless I should be able to get the error message.
    Thanks in advance,

    hi,
    it is not possible to find the run time errors in application server while writing the file.using sy-subrc only we can find out. where it is writing correctly like this.
    we can see all the application server files in this Tcode: AL11

  • ADF-BC/JSF How to display acustom error message from a backing bean

    Hi all
    Can anybody provide an example of how to manipulate the list of error messages from a JSF backing bean.
    In my code I use a different navigation case and this directs the user to the page displaying the error message but I am sure that there must be a more elegant way.
    Thanks in advance
    Thanassis

    Thanks Kris
    I think you 've put me on the right track here, it's just that in my case what I really want to do is prevent my users from editing records not belonging to their own group. This is done via a selectOne table component and then the backing bean code tests if the value #{row.UserGroup} matches the #{bindings.LoggedOnUserGroup.inputValue}. If the values are equal then the beans returns the navigation case to the edit page. Otherwise it returns the navigation case for the "cannot edit" page.
    So what I am thinking is to return null and somehow raise the right kind of exception in order to display the error in the af:messages tag.
    Thanassis

  • Error message from Antivirus

    I keep getting this error message from my Antivirus. Please see attachment. Can anyone tell me what is means where to find it and how to stop it please?.

    "Avast" is perhaps the worst of the whole wretched lot of commercial "security" products for the Mac. It's worse than the imaginary "viruses" you were worried about when you installed it. Not only does it fail to protect you, it throws false warnings, destabilizes and slows down your computer, and sometimes or always corrupts the network settings and the permissions of files in your home folder. Removing it may not repair all the damage, and neither will Disk Utility or even reinstalling OS X.
    Back up all data, then remove "Avast" according to the developer's instructions. Reboot.
    If you tried to remove Avast by dragging an application to the Trash, you'll have to reinstall it and follow the instructions linked above.
    If you still have problems after following those instructions, post again.

  • Java - Axis2: How to get an error code / error message from the Javascript via SOAP

    Hi
    In our Java applicsation we call a Javascript in a Indesign CS Server using the following code:
    --- SNIP BEGIN ---
    // calls the remote service on the indesign server
    try {
    // create service
    ServiceStub oIndsgnSrvStub = new
    ServiceStub(sIndesignServer);
    // create service parameter
    ServiceStub.RunScriptParameters
    oIndsgnSrvRSParams = new ServiceStub.RunScriptParameters();
    // create arguments with source- and target-file for parameter
    ServiceStub.IDSPScriptArg[] oIndsgnSrvSArgs = new ServiceStub.IDSPScriptArg[2];
    oIndsgnSrvSArgs[0] = new
    ServiceStub.IDSPScriptArg();
    oIndsgnSrvSArgs[0].setName("xml-input");
    oIndsgnSrvSArgs[0].setValue(sSourceFile);
    oIndsgnSrvSArgs[1] = new
    ServiceStub.IDSPScriptArg();
    oIndsgnSrvSArgs[1].setName("output-file");
    oIndsgnSrvSArgs[1].setValue(sTargetFile);
    // define service parameter
    oIndsgnSrvRSParams.setScriptArgs(oIndsgnSrvSArgs);
    oIndsgnSrvRSParams.setScriptFile(sScriptFile);
    oIndsgnSrvRSParams.setScriptLanguage("javascript");
    oIndsgnSrvRSParams.setScriptText("");
    // create runscript
    ServiceStub.RunScript oIndsgnSrvRS = new ServiceStub.RunScript();
    // set parameter
    oIndsgnSrvRS.setRunScriptParameters(oIndsgnSrvRSParams);
    //$$$ there should be an answer returned by the InddSrvr
    // execute SOAP call
    ServiceStub.RunScriptResult oIndsgnSrvRes = oIndsgnSrvStub.RunScript(oIndsgnSrvRS);
    if(oIndsgnSrvRes.getErrorNumber() == 0) {
    oServerProdJob.setProdState(CBP_Constant.REMOTEPRODUCTIONSTATE_SUCCESS);
    bOK = true;
    } else {
    oServerProdJob.setProdState(CBP_Constant.REMOTEPRODUCTIONSTATE_FAILURE);
    bOK = false;
    //$$$ should be set, if there is something returned by inddsrvr
    //oServerProdJob.setErrorMsg(sErrorMsg);
    } catch(Exception e) {
    sError += e.getMessage() + "\n";
    bOK = false;
    --- SNIP END -----
    The problem is that we don't get the error code and/or the error message from the Javascript in oIndsgnSrvRes. The error code is always 0 if I set an Integer value as return in the Javascript. If I set a String, there is an Exception in the Java application.
    Here is the Java script we use:
    --- SNIP BEGIN ---
    main();
    main()
    var sError = "";
    var sXMLInput = "";
    var sLayoutPath = "";
    // get the SDKCodeSnippetRunner object
    var cbpAdapter = app.cbpCbpadapterObject
    if (cbpAdapter) {
    sXMLInput=app.scriptArgs.get("xml-input");
    sLayoutOutputFile=app.scriptArgs.get("output-file");
    sError = cbpAdapter.doProcess(sXMLInput, sLayoutOutputFile);
    return sError; // This give an Exception; if I return an Integer the ScriptResult is always 0
    --- SNIP END -----
    If I try this with the test application from Adobe I get the error code correctly. But in the Java application, using SOAP, I can't get the error code.
    What could be wrong?
    Any ideas?
    Thanks a lot for the support.
    Kind regards
    Hans

    user11340104 wrote:
    Hello -
    i am calling sqlplus from a bash shell script. If the sql statement generates an error, how can I return that error code (unsuccessful) back to the bash shell?
    Well, let google be your friend,
    http://www.google.co.in/search?rlz=1C1GGLS_enIN327IN327&sourceid=chrome&ie=UTF-8&q=sqlplus+error+codes
    There are many threads I guess talking about the same issue.
    HTH
    Aman....

  • My printer works great but I keep getting error messages from HP Solutions Center

    I'm using an HP Officejet J6480 All in One Printer on a Windows 7 64 Bit machine.  The printer works great but I kept getting error messages from the HP Solutions Center every 15 seconds that popped up making it impossible to do work on my laptop so I uninstalled the Solutions Center to try to fix the problem.  Now the printer won't print. Is there a way to re-install the Solutions Center and get rid of the pop up error messages?

    hello Danagriz, unfortunately the plugin check page lags behind. adobe has released a critical patch for a vulnerability in its flash plugin, which is reportedly already exploited in the wild. therefore firefox will block insecure versions from running by default on websites for your protection.
    https://helpx.adobe.com/security/products/flash-player/apsb14-27.html https://addons.mozilla.org/firefox/blocked/p794
    please update to Adobe Flash Player version 16.0.0.235 as soon as possible, which you can download from http://www.adobe.com/products/flashplayer/distribution3.html (use the windows-exe for plugin-based browsers).
    in order to update java, go to java.com (or if you don't need the plugin you can also uninstall it though the windows control panel)

  • Cancel System Error Messages from RWB

    Hi All,
    I have nearly 3000 messages those were got System Error in Integration Engine process, but when i check messages in SXMB_MONI all are success and written to target folders also.There is no problem absolutely.
    Now i just want to cancel those System Error messages from RWB--Message Monitor to keep system green and do not want to see those system error messages again.
    Iam not able to cancel those messages from RWM, it is saying that User and pwd incorrect but iam providing correct one only.
    I went to details of that system error message from Message Monitor, i took message id and filtered with that in SXMB_MONI. i got the message with error state.Iam able to cancel that from MONI but not from RWB which is fine and disappearing from RWB list.
    the thing is i can't copy each and every message id by opening details button for every message
    How can i proceed for this. please advice me
    REgards

    Hi Ravi,
    For example iam able to see system error message in RWB--Message Monitor under Integration Engine at 9:30
    when i execute SXMB_MONI for the same time and see, there is no error message for that able to see success.
    When i took message id from RWB--message monitor and filter that in MONI means it is showing me the error message.
    I can able to cancel it from MONI which is fine. but this way i have 3000 messages in RWB--Message monitor under IE.
    How to copy and paste then filter those error messages in MONI???this is pain process to copy each and every one by one
    Iam not able to get those if i filter with the status group as System Error manual Restart Possible criteria
    Regards

Maybe you are looking for

  • How to look for kMAT material in Testing client?

    Hi PP members: How to look for KMAT material in Test client, Note: I went to mm60 and entered material type: KMAT it did not populate any materials Is there any way where I can find the materials, If yes please let me know thanks Suren

  • Delivery address in PO item level

    Hi, in PO item level there is a tab "Delivery address". Under this tab there is a Field "Address" having data for eg. 22706. 1.Please tell me from where this "address" comes. where is the customization for this "address". 2.Delivery address, is it re

  • Resetting ipod shuffle playlist in the field

    Here is my deal. On my shuffle I put four or five podcasts first in my playlist, then a few hundred songs. While I am out working, or recreating, sometimes I want to listen to podcasts, and sometimes I want music. When in sequential play, I can liste

  • CP8 'Runtime error!  R6025 - pure virtual function call (FIX)

    We just had this error appear while pressed to finish a customers job. All hell broke loose there was a lot of wailing and gnashing of teeth. Then our cool calm and collected IT dude Chris stepped in and tracked the problem down to this. 1. Reinstall

  • HT3825 so how do you convert the raw files to jpeg in iphoto?

    how do you convert the raw files to jpeg in iphoto?