Article:
  Syncing iTunes
Subject:   Great idea, one problem
Date:   2005-06-19 05:32:49
From:   Jim_Richvalsky
When I try to run the script I get the following error:


[Rohan:~/iTunesSync] jamesric% ./exportTunes --library
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:436)
at java.lang.Integer.<init>(Integer.java:609)
at com.fivevoltlogic.mytunes.MyTunesLibrary.processTrack(MyTunesLibrary.java:434)
at com.fivevoltlogic.mytunes.MyTunesLibrary.parse(MyTunesLibrary.java:321)
at com.fivevoltlogic.mytunes.sync.Export.main(Export.java:214)



Is it having trouble findin my library? Is there a problem with one of my songs?


Any ideas would be greatly appreciated.


Thanks!

Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • David Miller photo Great idea, one problem
    2005-06-20 13:28:59  David Miller | O'Reilly Blogger [View]

    Hm. Good question :).

    The following is line # 434 in MyTunesLibrary.java (where the exception is thrown):

    t.setSize(new Integer((String) track.get("Size")).intValue());

    So we're coming across a song that doesn't have its "Size" attribute specified (is it an internet radio stream?). This can be fixed by changing the line to:

    if (track.containsKey("Kind")) {
    t.setSize(new Integer((String) track.get("Size")).intValue());
    }


    If you have any problems let me know; I'll see if we can't put up a new zip file for downloading to prevent this from happening in the future. Sorry about the mixup!
    • Great idea, one problem
      2005-06-21 18:14:43  Jim_Richvalsky [View]

      Yes, I had two internet radio streams with duration set to continuous. I deleted them and it worked great! Thanks!