morpheus65535 / bazarr

Bazarr is a companion application to Sonarr and Radarr. It manages and downloads subtitles based on your requirements. You define your preferences by TV show or movie and Bazarr takes care of everything for you.
https://www.bazarr.media
GNU General Public License v3.0
2.86k stars 223 forks source link

import apprise module #2497

Closed nigeljordanww closed 5 months ago

nigeljordanww commented 5 months ago

I updated to latest beta of Bazarr [v1.4.3-beta.38] and it doesn't start anymore.

Using Python v3.11.6

Bazarr starting...
Traceback (most recent call last):
  File "/Users/nigelwestland/bazarr/bazarr/main.py", line 38, in <module>
    from app.notifier import update_notifier  # noqa E402
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nigelwestland/bazarr/bazarr/app/notifier.py", line 3, in <module>
    import apprise
  File "/Users/nigelwestland/bazarr/bazarr/../libs/apprise/__init__.py", line 58, in <module>
    from .Apprise import Apprise
ModuleNotFoundError: No module named 'apprise.Apprise'
Bazarr exited.
morpheus65535 commented 5 months ago

This issue has been fixed in beta.38. I don't what version you are running but bazarr/bazarr/app/notifier.py line 3 isn't import apprise: https://github.com/morpheus65535/bazarr/blob/development/bazarr/app/notifier.py#L3

I suggest you keep your config directory but empty the content of your Bazarr directory and extract the latest bazarr.zip asset to start new (https://github.com/morpheus65535/bazarr/releases/download/v1.4.3-beta.38/bazarr.zip).

nigeljordanww commented 5 months ago

I deleted my bazarr and downloaded the latest beta. Then I get this error:

Bazarr starting child process with PID 18904...
Traceback (most recent call last):
  File "/Users/nigelwestland/bazarr/bazarr/../libs/flask_restx/api.py", line 18, in <module>
    from flask.helpers import _endpoint_from_view_func
ImportError: cannot import name '_endpoint_from_view_func' from 'flask.helpers' (/Users/nigelwestland/bazarr/bazarr/../libs/flask/helpers.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/nigelwestland/bazarr/bazarr/main.py", line 36, in <module>

  File "/Users/nigelwestland/bazarr/bazarr/app/check_update.py", line 110, in check_if_new_update
    download_release(url=release['download_link'])
  File "/Users/nigelwestland/bazarr/bazarr/app/check_update.py", line 136, in download_release
    apply_update()
  File "/Users/nigelwestland/bazarr/bazarr/app/check_update.py", line 190, in apply_update
    logging.debug('BAZARR new release have been installed, now we restart')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nigelwestland/bazarr/bazarr/app/server.py", line 12, in <module>
    from api import api_bp
  File "/Users/nigelwestland/bazarr/bazarr/api/__init__.py", line 4, in <module>
    from flask_restx import Api, apidoc
  File "/Users/nigelwestland/bazarr/bazarr/../libs/flask_restx/__init__.py", line 2, in <module>
    from .api import Api  # noqa
    ^^^^^^^^^^^^^^^^^^^^
  File "/Users/nigelwestland/bazarr/bazarr/../libs/flask_restx/api.py", line 20, in <module>
    from flask.scaffold import _endpoint_from_view_func
  File "/Users/nigelwestland/bazarr/bazarr/../libs/flask/scaffold.py", line 20, in <module>
    from .helpers import locked_cached_property
ImportError: cannot import name 'locked_cached_property' from 'flask.helpers' (/Users/nigelwestland/bazarr/bazarr/../libs/flask/helpers.py)

When I close my terminal and try to run Bazarr again I get the same message:; Bazarr starting... Traceback (most recent call last): File "/Users/nigelwestland/bazarr/bazarr/main.py", line 38, in <module> from app.notifier import update_notifier # noqa E402 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/nigelwestland/bazarr/bazarr/app/notifier.py", line 3, in <module> import apprise File "/Users/nigelwestland/bazarr/bazarr/../libs/apprise/__init__.py", line 58, in <module> from .Apprise import Apprise ModuleNotFoundError: No module named 'apprise.Apprise' Bazarr exited.

morpheus65535 commented 5 months ago

What operating system? Python version? Using venv or not? pip list output?

nigeljordanww commented 5 months ago

Using macOS 14 Tried both Python 3.11.6 and 3.11.9 Not using venv

certifi 2024.2.2 lxml 4.9.4 numpy 1.26.4 pillow 10.3.0 pip 24.0 setuptools 65.5.0

morpheus65535 commented 5 months ago

What is the value of general-->branch in your config.yaml file?

nigeljordanww commented 5 months ago

its says master. It was on 'develop' before I did a clean install of the latest beta

morpheus65535 commented 5 months ago

So development branch that you unzip get overwritten by master on first start. Change the value to development and retry to unzip the last bazarr.zip file after wiping the content of installation directory.

nigeljordanww commented 5 months ago

Here a weird one. I removed everything of Bazarr. Downloaded the master v1.4.2 release. Everything works.

In settings - general in the UI I change the branch to development. I did the Bazarr task update and same problems appears. So even with a new master installation and changing and updating to the development branch, the same Apprise problem.

2024-05-16 07:51:31,741 - apscheduler.executors.default    (35740f000) :  WARNING (base:120) - Run time of job "Update Bazarr (trigger: interval[6:00:00], next run at: 2024-05-16 11:47:51 CEST)" was missed by 2:03:40.202557
2024-05-16 07:51:31,741 - apscheduler.executors.default    (36f04f000) :  WARNING (base:120) - Run time of job "Sync with Sonarr (trigger: interval[1:00:00], next run at: 2024-05-16 08:10:19 CEST)" was missed by 0:41:12.203095
2024-05-16 07:51:31,741 - apscheduler.executors.default    (36e043000) :  WARNING (base:120) - Run time of job "Search for Missing Series Subtitles (trigger: interval[6:00:00], next run at: 2024-05-16 12:12:56 CEST)" was missed by 1:38:35.203182
2024-05-16 07:51:31,742 - apscheduler.executors.default    (36b01f000) :  WARNING (base:120) - Run time of job "Sync with Radarr (trigger: interval[1:00:00], next run at: 2024-05-16 08:14:53 CEST)" was missed by 0:36:38.203815
2024-05-16 16:38:24,546 - apscheduler.executors.default    (35740f000) :  WARNING (base:120) - Run time of job "Sync with Sonarr (trigger: interval[1:00:00], next run at: 2024-05-16 17:10:19 CEST)" was missed by 0:28:05.007600
2024-05-16 16:38:24,546 - apscheduler.executors.default    (371067000) :  WARNING (base:120) - Run time of job "Sync with Radarr (trigger: interval[1:00:00], next run at: 2024-05-16 17:14:53 CEST)" was missed by 0:23:31.007794
2024-05-16 16:38:24,546 - apscheduler.executors.default    (36f04f000) :  WARNING (base:120) - Run time of job "Upgrade Previously Downloaded Subtitles (trigger: interval[12:00:00], next run at: 2024-05-16 22:35:36 CEST)" was missed by 6:02:48.007860
2024-05-16 16:38:24,546 - apscheduler.executors.default    (36e043000) :  WARNING (base:120) - Run time of job "Update Announcements File (trigger: interval[6:00:00], next run at: 2024-05-16 16:51:24 CEST)" was missed by 5:47:00.008104
2024-05-16 16:38:24,547 - apscheduler.executors.default    (36b01f000) :  WARNING (base:120) - Run time of job "Search for Missing Movies Subtitles (trigger: interval[6:00:00], next run at: 2024-05-16 17:23:38 CEST)" was missed by 5:14:46.008711
2024-05-16 16:38:24,547 - apscheduler.executors.default    (372073000) :  WARNING (base:120) - Run time of job "Check Health (trigger: interval[6:00:00], next run at: 2024-05-16 17:27:48 CEST)" was missed by 5:10:36.009032
2024-05-16 16:38:24,548 - apscheduler.executors.default    (37307f000) :  WARNING (base:120) - Run time of job "Search for Missing Series Subtitles (trigger: interval[6:00:00], next run at: 2024-05-16 18:12:56 CEST)" was missed by 4:25:28.009616
2024-05-16 16:38:28,680 - root                             (35740f000) :  INFO (server:94) - Bazarr is being restarted...
Bazarr is restarting...
Traceback (most recent call last):
  File "/Users/nigelwestland/bazarr/bazarr/main.py", line 39, in <module>
    from app.notifier import update_notifier  # noqa E402
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nigelwestland/bazarr/bazarr/app/notifier.py", line 3, in <module>
    from apprise import Apprise, AppriseAsset
  File "/Users/nigelwestland/bazarr/bazarr/../libs/apprise/__init__.py", line 58, in <module>
    from .apprise import Apprise
ModuleNotFoundError: No module named 'apprise.apprise'
Bazarr exited.
nigelwestland@Nigels-MacBook-Air bazarr % 

The branch in config.yaml is development

morpheus65535 commented 5 months ago

What's the content of /Users/nigelwestland/bazarr/bazarr/libs/apprise/ directory (only first level files, not sub directories)?

nigeljordanww commented 5 months ago
Screenshot 2024-05-17 at 18 10 25
morpheus65535 commented 5 months ago

There's missing files in your directory:

image

Both files are included in v1.4.3-beta.38 release.

nigeljordanww commented 5 months ago

I downloaded the beta again and placed those two files in the folder. That worked for me!

Somehow the update mechanism deleted these 2 files (for me) somehow but now it works!

morpheus65535 commented 5 months ago

I hope it will be fixed in upcoming beta. I'll run some test and see if it's safe to merge dev to master.

morpheus65535 commented 5 months ago

This one has been fixed.