Ticket #299 (closed Defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Cannot Seem to Populate Database With 1.07b2

Reported by: Push Eject Owned by:
Priority: normal Milestone:
Component: Leopard Version: 1.0b7
Keywords: Cc:

Description

I was running 1.0b6.5 last week when I had the power supply on one of my media drives fail recently and replaced the drive with its backup.

After the drive swap Sapphire no longer displayed correct titles/art/info.

I decided that was a good sign to check nanopi.net for a new version and downloaded and installed 1.0b7

It ran the database upgrade, but still no metadata. Being pragmatic I deleted /Library/Application? Support/Sapphire? all together and decided to import everything fresh.

I ran the importers after killing Front Row a few different times, but could never get Sapphire to show titles/art/etc...

My >Sapphire>Movies> is <EMPTY> on screen.

Attached most recent console log. Please let me know how provide more info.

Love Sapphire and what it has done for our family's entertainment over the last two years. Thank you for all your work. It's spectacular.

Push E. Mini Leopard 10.5.8 Front Row 2.1.3 Perian 1.1.4 iTunes 7.6.1 Quicktime 7.4.1

Attachments

Console Messages.txt Download (24.3 KB) - added by Push Eject 5 years ago.
Console Log clip

Change History

Changed 5 years ago by Push Eject

Console Log clip

comment:1 Changed 5 years ago by Push Eject

Update: Trashed /Library/Application? Support/Sapphire? and grabbed an old backup from a month ago.

Re-ran the database updater and now title info/art/etc shows up.

New files were missing so I ran the data importers and selected the imdb titles and posters, but the new titles remain unimported. Console log example below.

Happy to try any tests you'd like.

Thanks, guys.

8/13/09 9:59:47 PM	Front Row[1897]	NSScanner: nil string argument	
8/13/09 9:59:47 PM	Front Row[1897]	Imported a movie with no title: {
    Cast =     (
        "Rossano Brazzi",
        "Mitzi Gaynor",
        "John Kerr",
        "Ray Walston",
        "Juanita Hall",
        "France Nuyen",
        "Russ Brown",
        "Floyd Simmons",
        "Tom Laughlin",
        "Jack Mullaney",
        "Ken Clark",
        "Archie Savage",
        "Candace Lee",
        "Warren Hsieh",
        "Francis Kahele"
    );
    Director =     (
        "Joshua Logan"
    );
    Genres =     (
        Musical,
        Romance,
        War
    );
    "IMDB Rating" = 6.8;
    "MPAA Rating" = "N/A";
    "Movie ID" = "/title/tt0052225";
    Oscars = 1;
    Plot = "On a South Pacific island during World War II, love blooms between a young nurse and a secretive Frenchman who's being courted for a dangerous military mission. ";
    "Release Date" = 1958-03-19 12:00:00 -0800;
}	
8/13/09 9:59:47 PM	Front Row[1897]	Failed to import movie for /Volumes/Media Drive/Movies/Musicals/SOUTH PACIFIC.m4v	
8/13/09 9:59:47 PM	Front Row[1897]	Save successful	

comment:2 Changed 5 years ago by gbooker

  • Milestone set to Awaiting User Feedback

For some reason, IMDB seems to give us data that's invalid from time to time.

Does this issue persist on the same files?

Did any data get imported?

comment:3 Changed 5 years ago by Push Eject

Tried again, new items (i.e. items that were not in 1.065's db) generate a "nil string argument" / "Imported a movie with no title" in console.log

Cheers, GB.

comment:4 Changed 5 years ago by gbooker

Did any new data get imported that was not there prior to the import?

If the import is run again at a later time, does it succeed in importing data that previously failed or does it continually fail on the same files each time?

If the answer to the previous is no, what filenames does it fail on?

comment:5 Changed 5 years ago by wazza

I think IMDb may have changed their HTML source.

I tried it with "Eternal Sunshine of the Spotless Mind". It had already been imported so I know it should work, so I reset the import decision and re-imported. It is now failing.

In getMetaForMovie:withPath: the call to objectsForXQuery:error: is returning a nil value instead of the expected array. I guess IMDB_RESULT_TITLE_YEAR_XPATH is no longer valid as a search string. I'm afraid I don't know enough about XPath to say where it is going wrong.

The IMDb source is:

<div id="tn15title">
<h1>Eternal Sunshine of the Spotless Mind <span>(<a href="/Sections/Years/2004/">2004</a>)
<span class="pro-link">
<a href="http://pro.imdb.com/rg/maindetails-title/tconst-pro-header-link/title/tt0338013/">
More at <strong>IMDbPro</strong> &raquo;</a></span></span></h1>
</div>

comment:6 Changed 5 years ago by gbooker

The XPath is correct for that source. When it failed, you said that objectsForXQuery:error: is returning nil. Is error also nil?

I'm having a hard time reproducing this error. Everything I try gives me a valid title on import.

comment:7 Changed 5 years ago by wazza

Hi Graham,

The error is interesting:

XQueryError:17 - "invalid arguments to function - replace" 

I ran software update a couple of days ago. (I'm now running 10.5.8, with Xcode 3.1.2) so perhaps some underlying libraries have been updated and the prototype for replace has been changed in the latest libs? That's the only thing I can think of that may have caused this. (But it doesn't make sense seeing as replace() is standardised in XPath 2.0)

A quick hack of

-#define IMDB_RESULT_TITLE_YEAR_XPATH	@"//div[@id='tn15title']/h1/replace(string(), '\n', '')"
+#define IMDB_RESULT_TITLE_YEAR_XPATH	@"//div[@id='tn15title']/h1/string()"

has fixed the problem. I'm not sure if it's the 100% correct solution, but it looks like there's no need to clear the newline character.

comment:8 Changed 5 years ago by Push Eject

GB,

Something is definitely changing because once it fails to import a title it doesn't request it or do the poster chooser again. However in the log I see that it tries imdb again without success.

Console log:

8/16/09 10:46:08 AM	OSXvnc-server[150]	Protocol version 3.8
8/16/09 10:46:08 AM	OSXvnc-server[150]	Pixel format for client 10.15.0.7:
8/16/09 10:46:08 AM	OSXvnc-server[150]	  32 bpp, depth 24, little endian
8/16/09 10:46:08 AM	OSXvnc-server[150]	  true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
8/16/09 10:46:08 AM	OSXvnc-server[150]	ENCODING: ZRLE for client 10.15.0.7
8/16/09 10:46:08 AM	OSXvnc-server[150]	Client Connected - Registering Screen Update Notification
8/16/09 10:46:18 AM	Front Row[1969]	Save successful	
8/16/09 10:46:18 AM	Front Row[1969]	Save successful	
8/16/09 10:46:27 AM	Front Row[1969]	Save successful	
8/16/09 10:46:29 AM	Front Row[1969]	NSScanner: nil string argument	
8/16/09 10:46:29 AM	Front Row[1969]	Imported a movie with no title: {
    Cast =     (
        "Cary Grant",
        "Priscilla Lane",
        "Raymond Massey",
        "Jack Carson",
        "Edward Everett Horton",
        "Peter Lorre",
        "James Gleason",
        "Josephine Hull",
        "Jean Adair",
        "John Alexander",
        "Grant Mitchell",
        "Edward McNamara",
        "Garry Owen",
        "John Ridgely",
        "Vaughan Glaser"
    );
    Director =     (
        "Frank Capra"
    );
    Genres =     (
        Comedy,
        Thriller
    );
    "IMDB Rating" = 8.1;
    "IMDB Top 250" = 232;
    "MPAA Rating" = "N/A";
    "Movie ID" = "/title/tt0036613";
    Oscars = 0;
    Plot = "A drama critic learns on his wedding day that his beloved maiden aunts are homicidal maniacs, and that insanity runs in his family. ";
    "Release Date" = 1944-09-23 12:00:00 -0700;
}	
8/16/09 10:46:29 AM	Front Row[1969]	Failed to import movie for /Volumes/Media Drive/Movies/Classics/ARSENIC_AND_OLD_LACE.m4v	

8/16/09 10:49:47 AM	com.apple.RemoteUI[2093]	Sun Aug 16 10:49:47 movie-Server-mini.local Front Row[2093] <Error>: Corrupt JPEG data: premature end of data segment	
8/16/09 10:49:47 AM	com.apple.RemoteUI[2093]			
8/16/09 10:50:35 AM	com.apple.RemoteUI[2093]	Sun Aug 16 10:50:35 movie-Server-mini.local Front Row[2093] <Error>: Corrupt JPEG data: premature end of data segment	
8/16/09 10:50:35 AM	com.apple.RemoteUI[2093]			
8/16/09 10:50:35 AM	com.apple.RemoteUI[2093]	Sun Aug 16 10:50:35 movie-Server-mini.local Front Row[2093] <Error>: Corrupt JPEG data: premature end of data segment	
8/16/09 10:50:35 AM	com.apple.RemoteUI[2093]			
8/16/09 10:50:42 AM	Front Row[2093]	NSScanner: nil string argument	
8/16/09 10:50:42 AM	Front Row[2093]	Imported a movie with no title: {
    Cast =     (
        "Jim Carrey",
        "Zooey Deschanel",
        "Bradley Cooper",
        "John Michael Higgins",
        "Rhys Darby",
        "Danny Masterson",
        "Fionnula Flanagan",
        "Terence Stamp",
        "Sasha Alexander",
        "Molly Sims",
        "Brent Briscoe",
        "Rocky Carroll",
        "John Cothran Jr.",
        "Spencer Garrett",
        "Sean O'Bryan"
    );
    Director =     (
        "Peyton Reed"
    );
    Genres =     (
        Comedy,
        Romance
    );
    "IMDB Rating" = 7;
    "MPAA Rating" = "PG-13";
    "Movie ID" = "/title/tt1068680";
    Oscars = 0;
    Plot = "A guy challenges himself to say \"yes\" to everything for an entire year. ";
    "Release Date" = 2008-12-17 12:00:00 -0800;
}	
8/16/09 10:50:42 AM	Front Row[2093]	Failed to import movie for /Volumes/Media Drive 2/Movies/Drama/Yes Man.m4v

System Log:

Aug 16 00:00:00 movie-Server-mini newsyslog[1746]: logfile turned over
Aug 16 00:04:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 00:19:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 00:47:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 01:02:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 02:02:12 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 02:15:12 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 02:58:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 03:28:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 03:55:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 05:24:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 05:39:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 06:09:43 movie-Server-mini FrontRow[1969]: ******** Application Startup ********
Aug 16 06:11:07 movie-Server-mini FrontRow[1969]: Load State Backoff Disabled
Aug 16 06:11:07 movie-Server-mini FrontRow[1969]: Movie Loadstate: kMovieLoadStateComplete
Aug 16 06:11:07 movie-Server-mini FrontRow[1969]: Video Player: Using Standard Load Monitor
Aug 16 06:35:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 07:18:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 08:02:42 movie-Server-mini Front Row[1969]: Save successful
Aug 16 08:13:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 08:42:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 09:11:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 09:26:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 09:55:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 10:08:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 10:24:13 movie-Server-mini kernel[0]: AppleYukon2: 00000000,00000000 sk98nif - deadmanCheck - nothing received, soft reset of chip
Aug 16 10:46:08 movie-Server-mini OSXvnc-server[150]: Protocol version 3.8
Aug 16 10:46:08 movie-Server-mini OSXvnc-server[150]: Pixel format for client 10.15.0.7:
Aug 16 10:46:08 movie-Server-mini OSXvnc-server[150]:   32 bpp, depth 24, little endian
Aug 16 10:46:08 movie-Server-mini OSXvnc-server[150]:   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
Aug 16 10:46:08 movie-Server-mini OSXvnc-server[150]: ENCODING: ZRLE for client 10.15.0.7
Aug 16 10:46:08 movie-Server-mini OSXvnc-server[150]: Client Connected - Registering Screen Update Notification
Aug 16 10:46:18 movie-Server-mini Front Row[1969]: Save successful
Aug 16 10:46:29: --- last message repeated 2 times ---
Aug 16 10:46:29 movie-Server-mini Front Row[1969]: NSScanner: nil string argument
Aug 16 10:46:29 movie-Server-mini Front Row[1969]: Imported a movie with no title: {\n    Cast =     (\n        "Cary Grant",\n        "Priscilla Lane",\n        "Raymond Massey",\n        "Jack Carson",\n        "Edward Everett Horton",\n        "Peter Lorre",\n        "James Gleason",\n        "Josephine Hull",\n        "Jean Adair",\n        "John Alexander",\n        "Grant Mitchell",\n        "Edward McNamara",\n        "Garry Owen",\n        "John Ridgely",\n        "Vaughan Glaser"\n    );\n    Director =     (\n        "Frank Capra"\n    );\n    Genres =     (\n        Comedy,\n        Thriller\n    );\n    "IMDB Rating" = 8.1;\n    "IMDB Top 250" = 232;\n    "MPAA Rating" = "N/A";\n    "Movie ID" = "/title/tt0036613";\n    Oscars = 0;\n    Plot = "A drama critic learns on his wedding day that his beloved maiden aunts are homicidal maniacs, and that insanity runs in his family. ";\n    "Release Date" = 1944-09-23 12:00:00 -0700;\n}
Aug 16 10:46:29 movie-Server-mini Front Row[1969]: Failed to import movie for /Volumes/Media Drive/Movies/Classics/ARSENIC_AND_OLD_LACE.m4v

Aug 16 10:50:35 movie-Server-mini com.apple.RemoteUI[2093]: Sun Aug 16 10:50:35 movie-Server-mini.local Front Row[2093] <Error>: Corrupt JPEG data: premature end of data segment
Aug 16 10:50:35 movie-Server-mini com.apple.RemoteUI[2093]: 	
Aug 16 10:50:35 movie-Server-mini com.apple.RemoteUI[2093]: Sun Aug 16 10:50:35 movie-Server-mini.local Front Row[2093] <Error>: Corrupt JPEG data: premature end of data segment
Aug 16 10:50:35 movie-Server-mini com.apple.RemoteUI[2093]: 	
Aug 16 10:50:42 movie-Server-mini Front Row[2093]: NSScanner: nil string argument
Aug 16 10:50:42 movie-Server-mini Front Row[2093]: Imported a movie with no title: {\n    Cast =     (\n        "Jim Carrey",\n        "Zooey Deschanel",\n        "Bradley Cooper",\n        "John Michael Higgins",\n        "Rhys Darby",\n        "Danny Masterson",\n        "Fionnula Flanagan",\n        "Terence Stamp",\n        "Sasha Alexander",\n        "Molly Sims",\n        "Brent Briscoe",\n        "Rocky Carroll",\n        "John Cothran Jr.",\n        "Spencer Garrett",\n        "Sean O'Bryan"\n    );\n    Director =     (\n        "Peyton Reed"\n    );\n    Genres =     (\n        Comedy,\n        Romance\n    );\n    "IMDB Rating" = 7;\n    "MPAA Rating" = "PG-13";\n    "Movie ID" = "/title/tt1068680";\n    Oscars = 0;\n    Plot = "A guy challenges himself to say \"yes\" to everything for an entire year. ";\n    "Release Date" = 2008-12-17 12:00:00 -0800;\n}
Aug 16 10:50:42 movie-Server-mini Front Row[2093]: Failed to import movie for /Volumes/Media Drive 2/Movies/Drama/Yes Man.m4v

Aug 16 10:50:43 movie-Server-mini Front Row[2093]: Save successful
Aug 16 10:51:00: --- last message repeated 2 times ---
Aug 16 10:51:00 movie-Server-mini com.apple.coreservicesd[48]: NOTE:  Using non-mach-based version of client -> server communication, via direct function calls.
Aug 16 10:51:01: --- last message repeated 3 times ---
Aug 16 10:51:01 movie-Server-mini login[2097]: USER_PROCESS: 2097 ttys000
Aug 16 10:51:06 movie-Server-mini login[2097]: DEAD_PROCESS: 2097 ttys000
Aug 16 10:51:03 movie-Server-mini com.apple.launchd[110] (com.apple.RemoteUI[2093]): Exited: Terminated
Aug 16 10:51:07 movie-Server-mini com.apple.coreservicesd[48]: NOTE:  Using non-mach-based version of client -> server communication, via direct function calls.
Aug 16 10:51:20: --- last message repeated 7 times ---
Aug 16 10:51:20 movie-Server-mini FrontRow[2113]: ******** Application Startup ********
Aug 16 10:51:36 movie-Server-mini Front Row[2113]: Save successful
Aug 16 10:53:05 movie-Server-mini com.apple.launchd[110] (0x1095d0.Locum[2118]): Exited: Terminated
Aug 16 10:55:08 movie-Server-mini com.apple.coreservicesd[48]: NOTE:  Using non-mach-based version of client -> server communication, via direct function calls.
Aug 16 10:56:36: --- last message repeated 3 times ---

Sorry so verbose. I tried pruning the above down, but I'm not sure what is valuable information and what isn't.

I also have my V2 DB before and after an import attempt. Is that helpful? What can I open it with?

Cheers

comment:9 Changed 5 years ago by gbooker

(In [879]) No longer call the replace function with string() as its argument as it seems Apple may have broken this. There appears to be no need any longer for movies as IMDB doesn't put newlines in the title. The episode importer which used this has been refactored to use other means. Refs #299

comment:10 Changed 5 years ago by gbooker

That commit may have fixed it. Can either of you confirm?

comment:11 Changed 5 years ago by Push Eject

Yikes. I feel dumb, GB. I don't know how to compile the [879] change into the beta to test it.

I'm willing! Just tell me how to do it.

Sorry. :::embarrassed:::

PE

comment:12 Changed 5 years ago by gbooker

Push, my comment is more directed at wazza since I know he can. Anyway, first you need leopard with the development tools (Xcode) installed. Then you need the setup for building Sapphire, the best instructions are  http://wiki.awkwardtv.org/wiki/Create_Environment_for_stock_ATV_1.1_Development_with_Leopard Finally, you open the project, select the "Complete Sapphire" target (should be the default), and hit build.

comment:13 Changed 5 years ago by wazza

Commit is good.

I noticed recently imported shows didn't have summaries but thought that may have been because TV rage didn't have them yet. The mod to the TV importer also fixes this.

Can close.

comment:14 Changed 5 years ago by gbooker

  • Status changed from new to closed
  • Resolution set to fixed

Closing as fixed until we hear otherwise.

comment:15 Changed 5 years ago by Push Eject

Awesome! Thanks GB and wazza!

Looking forward to b3!

comment:16 Changed 5 years ago by gbooker

  • Milestone Awaiting User Feedback deleted
Note: See TracTickets for help on using tickets.