Plex-Auto-Languages icon indicating copy to clipboard operation
Plex-Auto-Languages copied to clipboard

Scheduler Error in UnRaid Docker

Open shomilsaini opened this issue 1 year ago • 15 comments

2023-08-20 02:00:00,826 [INFO] Starting scheduler task
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/app/plex_auto_languages/utils/scheduler.py", line 22, in run
    schedule.run_pending()
  File "/usr/local/lib/python3.8/site-packages/schedule/__init__.py", line 822, in run_pending
    default_scheduler.run_pending()
  File "/usr/local/lib/python3.8/site-packages/schedule/__init__.py", line 100, in run_pending
    self._run_job(job)
  File "/usr/local/lib/python3.8/site-packages/schedule/__init__.py", line 172, in _run_job
    ret = job.run()
  File "/usr/local/lib/python3.8/site-packages/schedule/__init__.py", line 693, in run
    ret = self.job_func()
  File "main.py", line 107, in scheduler_callback
    self.plex.start_deep_analysis()
  File "/app/plex_auto_languages/plex_server.py", line 283, in start_deep_analysis
    episode.reload()
  File "/usr/local/lib/python3.8/site-packages/plexapi/base.py", line 394, in reload
    return self._reload(key=key, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/plexapi/base.py", line 952, in _reload
    raise NotImplementedError('History objects cannot be reloaded. Use source() to get the source media item.')
NotImplementedError: History objects cannot be reloaded. Use source() to get the source media item.

shomilsaini avatar Aug 21 '23 17:08 shomilsaini

I have the exact same issue Any solution ?

nwicone avatar Oct 16 '23 06:10 nwicone

Same for me in a proxmox docker.

foostuff avatar Nov 21 '23 07:11 foostuff

Same for me in a proxmox docker.

Can you share your docker config ? I will check if you've set everything correctly.

nwicone avatar Nov 21 '23 10:11 nwicone

sure. my env is here: https://pastebin.com/uNNVbtw1 I pasted the minimal configuration into portainer: https://github.com/RemiRigal/Plex-Auto-Languages#docker-compose-minimal-configuration

foostuff avatar Nov 21 '23 14:11 foostuff

sure. my env is here: https://pastebin.com/uNNVbtw1 I pasted the minimal configuration into portainer: https://github.com/RemiRigal/Plex-Auto-Languages#docker-compose-minimal-configuration

Thank you, I don't see any problem of configuration. When it happened to me, I just had to restart the app

nwicone avatar Nov 21 '23 16:11 nwicone

Not specific to unraid, seeing this in docker on 22.04

bakerboy448 avatar Jan 22 '24 17:01 bakerboy448

Same as bakerboy, just started using this as of last night and went to go check on some docker stuff today and noticed this error in plexautolanguages logs.

JourneyOver avatar Feb 04 '24 19:02 JourneyOver

Same error with Docker on Windows 11

LightSeek3r avatar Feb 27 '24 07:02 LightSeek3r

Seeing this on local debian install. So I guess Scheduling is completely broken?

ChristianMalazarte avatar Apr 12 '24 10:04 ChristianMalazarte

Still seeing this with Docker on Windows 11. At every single run. Incrementally, over days, it causes instabilities in Docker. image

LightSeek3r avatar May 08 '24 05:05 LightSeek3r

I have a script that restarts Plex Auto Languages every 6 hours lol.

ChristianMalazarte avatar May 08 '24 09:05 ChristianMalazarte

If resolving that bug is too hard, at least could we have a way not to have this scheduler activated? External scripts to restart the whole thing because it crashed is at best a temporary mitigation solution, not an okay thing in software development

LightSeek3r avatar May 08 '24 09:05 LightSeek3r

If resolving that bug is too hard, at least could we have a way not to have this scheduler activated? External scripts to restart the whole thing because it crashed is at best a temporary mitigation solution, not an okay thing in software development

The developer has been AWOL for a long time now so good luck.

ChristianMalazarte avatar May 08 '24 13:05 ChristianMalazarte

I am aware this is meant to be a Docker-centric thread. I'm running it on bare metal, fully up-to-date Debian 12.5. I setup the script yesterday. I left it running overnight. I woke up to see the scheduler crashed. It was still running in the terminal but I wasn't sure if the script was still running sufficiently despite the crash.

What is the purpose of the scheduler? The script appeared to be working as intended without it.

To the author or any active people, I'm willing to provide any info I can to facilitate a fix.

crash

michaeljh9 avatar Jun 17 '24 14:06 michaeljh9

I am aware this is meant to be a Docker-centric thread. I'm running it on bare metal, fully up-to-date Debian 12.5. I setup the script yesterday. I left it running overnight. I woke up to see the scheduler crashed. It was still running in the terminal but I wasn't sure if the script was still running sufficiently despite the crash.

What is the purpose of the scheduler? The script appeared to be working as intended without it.

To the author or any active people, I'm willing to provide any info I can to facilitate a fix.

crash

scheduler: # Whether of not to enable the scheduler, defaults to 'true' # The scheduler will perform a deeper analysis of all recently played TV Shows enable: false

Whereamnow avatar Jul 05 '24 22:07 Whereamnow

I am aware this is meant to be a Docker-centric thread. I'm running it on bare metal, fully up-to-date Debian 12.5. I setup the script yesterday. I left it running overnight. I woke up to see the scheduler crashed. It was still running in the terminal but I wasn't sure if the script was still running sufficiently despite the crash. What is the purpose of the scheduler? The script appeared to be working as intended without it. To the author or any active people, I'm willing to provide any info I can to facilitate a fix. crash

scheduler: # Whether of not to enable the scheduler, defaults to 'true' # The scheduler will perform a deeper analysis of all recently played TV Shows enable: false

Where is this setting to toggle scheduler off? I am running on UnRaid as Docker container.

Edit: Found it inside the docker container, will map a folder to config and make it static. Thanks for pointing me in the right direction.

Thanks

shomilsaini avatar Aug 16 '24 17:08 shomilsaini

So, mapped default.yaml from host to container as follows: map container - /app/config to host - /mnt/user/appdata/plex-auto-languages/config create default.yaml in the host with file contents as below.

Here is the file contents if anyone is interested:

plexautolanguages:
  update_level: "show"
  update_strategy: "next"
  trigger_on_play: true
  trigger_on_scan: true
  trigger_on_activity: false
  refresh_library_on_scan: true
  ignore_tags:
    - PAL_IGNORE

  plex:
    url: ""
    token: ""

  scheduler:
    enable: false
    schedule_time: "02:00"

  notifications:
    enable: false
    apprise_configs: []

  debug: false

Closing the issue as dev is not responding and this is the best I can find for now.

Thanks everyone!

shomilsaini avatar Aug 16 '24 18:08 shomilsaini