Jump to content

Calculate statistics for all users failed


keithsrobertson

Recommended Posts

keithsrobertson

Seen an error couple times today show up in the alerts section

Object reference not set to an instance of an object.
at Statistics.Helpers.Calculator.CalculateNewestAddedEpisode()
at Statistics.ScheduledTasks.CalculateStatsTask.MediaBrowser.Model.Tasks.IScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)

Statistics was updated the day before, so might be related to that I guess.

 

 

screenshot.102.png

screenshot.101.png

Link to comment
Share on other sites

hackthis02

It looks like the TVDB id for one (or more) of your shows is coming back as -1. I would suggest refreshing your metadata and trying again. If that doesn't work, try editing the metadata and confirming the TVDB id is correct.

Link to comment
Share on other sites

keithsrobertson

I guess this is related to the failing metadata fetching in other threads. My collection is too large to go through every title and manually change ids, which is the whole point of the emby doing stuff like that automatically. A better solution is for the plugin to check for a -1 and instead of failing, skip that entry and continue. It can tally up how many entries are marked as -1. If all entries are coming back as -1 then there is a potential problem with the metadata fetching / a change in the format on the sites referenced (tvmb, imdb, tvmaze etc etc) and the plugin should then alert user to that issue.

Link to comment
Share on other sites

hackthis02

A check for -1 is a good idea I might add in the future. Since this plugin isn't responsible for the metadata, it's outside the scope to check it and alert the user. if you're having issues with the TVDB plugin I would jump on those threads and offer your logs as help.

Link to comment
Share on other sites

  • 2 months later...

I get the same issue now and I have re-indexed and rescanned everything, but still no go.
It would be good if we can get an indication of the exact item the problem occurs on as we can target that item to verify the metadata:

I don't know if the item shown last, or if it is the next one (which I don't know what it is then). The last item seems fine though.

 

2022-09-02 11:38:20.739 Debug Statistics: CalculateMovieQualities Breaking Bad: Abiquiu: 1080p
2022-09-02 11:38:20.740 Debug Statistics: CalculateMovieQualities Cheers: Abnormal Psychology: 1080p
2022-09-02 11:38:20.740 Debug Statistics: CalculateMovieQualities Shameless (US): Abortion Rules: 1080p
2022-09-02 11:38:20.743 Error TaskManager: Error
    *** Error Report ***
    Version: 4.7.6.0
    Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb
    Operating system: Linux version 5.4.0-96-generic (buildd@lcy02-amd64-007) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #109~18.04.1-Ubuntu SMP Thu Jan 13 15:06:26
    Framework: .NET 6.0.2
    OS/Process: x64/x64
    Runtime: opt/emby-server/system/System.Private.CoreLib.dll
    Processor count: 2
    Data path: /var/lib/emby
    Application path: /opt/emby-server/system
    System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
       at Statistics.Helpers.Calculator.CalculateMovieQualities()
       at Statistics.ScheduledTasks.CalculateStatsTask.MediaBrowser.Model.Tasks.IScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
       at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
    Source: statistics
    TargetSite: statistics.Models.Configuration.ValueGroup CalculateMovieQualities()
    
2022-09-02 11:38:20.743 Debug TaskManager: Calculate statistics for all users Failed after 4 minute(s) and 28 seconds

 

 

Link to comment
Share on other sites

hackthis02

The log should display the media item it's doing before it starts the actual work. Hopefully this will allow users to pinpoint which item in their libraries is giving them trouble.

Edited by hackthis02
Link to comment
Share on other sites

  • 8 months later...
CloaknDagr

I'm an Emby lifetime subscriber.  I have this problem too.  A quick search brought up this conversation.  If the plugin author isn't willing to fix his plugin, because whatever the reason it's failing it's his plugin that is failing, then he should withdraw it from the Emby plugin library.  Asking all of us to go through potentially thousands of video and audio metadata files is just not something anyone should seriously suggest.  If the plugin cannot operate because of a metadata issue, when everything else works just fine ... That is an issue with the plugin not some metadata irregularity in the huge media libraries some of us possess. 

 

The solution is to fix this plugin and release an update for it, or withdraw it from the plugin library offerings. 

  • Like 1
Link to comment
Share on other sites

2 hours ago, CloaknDagr said:

I'm an Emby lifetime subscriber.  I have this problem too.  A quick search brought up this conversation.  If the plugin author isn't willing to fix his plugin, because whatever the reason it's failing it's his plugin that is failing, then he should withdraw it from the Emby plugin library.  Asking all of us to go through potentially thousands of video and audio metadata files is just not something anyone should seriously suggest.  If the plugin cannot operate because of a metadata issue, when everything else works just fine ... That is an issue with the plugin not some metadata irregularity in the huge media libraries some of us possess. 

 

The solution is to fix this plugin and release an update for it, or withdraw it from the plugin library offerings. 

Hi, can you please provide a server log example? 

Link to comment
Share on other sites

hackthis02
On 5/18/2023 at 8:58 AM, jlficken said:

I'm having this problem as well and would love some thoughts as to how to fix it.

I've tried to track it down but I'm failing.

embyserver.txt 46.66 kB · 1 download

It looks like your system doesn't have the TVDB files. Confirm you have the TVDB plugin installed. Then click the triple dots on your TV/Movies tile and select Refresh Metadata. You can try the "Search for missing metadata" but if that doesn't work, use the "Replace all metadata"

Edited by hackthis02
Link to comment
Share on other sites

hackthis02
On 5/15/2023 at 3:01 PM, CloaknDagr said:

I'm an Emby lifetime subscriber.  I have this problem too.  A quick search brought up this conversation.  If the plugin author isn't willing to fix his plugin, because whatever the reason it's failing it's his plugin that is failing, then he should withdraw it from the Emby plugin library.  Asking all of us to go through potentially thousands of video and audio metadata files is just not something anyone should seriously suggest.  If the plugin cannot operate because of a metadata issue, when everything else works just fine ... That is an issue with the plugin not some metadata irregularity in the huge media libraries some of us possess. 

 

The solution is to fix this plugin and release an update for it, or withdraw it from the plugin library offerings. 

The above issue is almost a year old. Since then, I've made many fixes and enhancements. This is an old thread about an issue that was resolved. Without a log file I can't confirm you're experiencing the same issue. If you would like a more updated conversation on this plugin, please visit the main topic thread. There you can submit a logfile and I'll happily review it and either fix the issue or go over potential steps to resolve it.

 

Link to comment
Share on other sites

jlficken
On 5/21/2023 at 4:11 PM, hackthis02 said:

It looks like your system doesn't have the TVDB files. Confirm you have the TVDB plugin installed. Then click the triple dots on your TV/Movies tile and select Refresh Metadata. You can try the "Search for missing metadata" but if that doesn't work, use the "Replace all metadata"

 

I have TheTVDB plugin installed at version 1.4.0.0 but I'll try the refresh metadata and report back.

Link to comment
Share on other sites

jlficken

@hackthis02

 

What happens if the item isn't found in TVDB therefore no files from the plugin exist?  I'm assuming you have error handling in place for that occurrence since it's bound to happen?  I  know I have several items that aren't found on TVDB.

Edited by jlficken
Link to comment
Share on other sites

hackthis02
On 5/25/2023 at 12:47 PM, jlficken said:

@hackthis02

 

What happens if the item isn't found in TVDB therefore no files from the plugin exist?  I'm assuming you have error handling in place for that occurrence since it's bound to happen?  I  know I have several items that aren't found on TVDB.

Actually, I do have a check. Let me figure out why it's not getting hit.

Link to comment
Share on other sites

jlficken
1 hour ago, hackthis02 said:

Actually, I do have a check. Let me figure out why it's not getting hit.


I figured you would but wanted to ask. 
 

I replied to your IM. If you need more information let me know and I’ll get it for you. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...