Git Product home page Git Product logo

Comments (15)

morpheus65535 avatar morpheus65535 commented on September 25, 2024 2

Ok so I've deployed an Ubuntu 24.04 virtual machine, followed the wiki with some adaptations:

  1. Requirements installation: apt-get install 7zip python3-dev python3-pip **python3-setuptools** unrar unzip
  2. Before step 6, I had to disable EXTERNALLY-MANAGED flag introduced in newer distros: mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.bkp

Once you start Bazarr 1.4.3, you can see some SyntaxWarning caused by outdated REGEX string that are fixed in upcoming 1.4.4.

Globally, it's working perfectly fine if you install python3-setuptools. Regarding EXTERNALLY-MANAGED flag, you can also use venv to prevent having to disable this globally.

I don't see anything to fix in Bazarr but I'll add mentions to the wiki about those 2 adaptations.

Thanks for reporting.

from bazarr.

carrow8993 avatar carrow8993 commented on September 25, 2024 1

I ran into the same issue trying to test the current dev environment under Ubuntu 24.04. The setuptools package provided through apt is only on version 68.1.2, a later version is needed to run properly/respect distutils import. I was able to resolve the issue by forcing my venv to update to the latest setuptools (70.1.0).

As far as I can tell, until apt gets the update, Ubuntu 24.04 hosts will either have to host their install through a venv or use pip's --break-system-packages flag to update the system env's version, with the risk of breaking system packages.

from bazarr.

morpheus65535 avatar morpheus65535 commented on September 25, 2024

Provide full installation log. Only the final error message doesn't help.

from bazarr.

DannyJanmaat avatar DannyJanmaat commented on September 25, 2024

Hey Morpheus65535,

Try install the software via the provided instructions and you immediatelly see what I mean. The instructions for Ubuntu simply don't work because of the deprecated python3-distutils. I hope you can update the instructions soon so we can get it working again on Ubuntu :).

from bazarr.

morpheus65535 avatar morpheus65535 commented on September 25, 2024

Have you tried installing setuptools which is supposed to include distutils?

apt-get install python3-setuptools

from bazarr.

DannyJanmaat avatar DannyJanmaat commented on September 25, 2024

from bazarr.

morpheus65535 avatar morpheus65535 commented on September 25, 2024

Let me know! I don't have a environment to test it so your input is welcome.

from bazarr.

GoldenCracker97 avatar GoldenCracker97 commented on September 25, 2024

Thought I'd chime in on my Ubuntu 24.04 install. Identical issue to DannyJanmaat. (my first github bug report, cheers)

from bazarr.

morpheus65535 avatar morpheus65535 commented on September 25, 2024

Is @carrow8993 fix your issue @DannyJanmaat ?

from bazarr.

FDrebin avatar FDrebin commented on September 25, 2024

Still have an error when trying to deploy on Ubuntu 24.04 LTS, specifically with some part of Python3. Also tried the workaround outlined in #2201 (comment) but could not get it to work with Ubuntu 24.04 LTS .

from bazarr.

MaZchen avatar MaZchen commented on September 25, 2024

Thought I'd chime in on my Ubuntu 24.04 install. Identical issue to DannyJanmaat. (my first github bug report, cheers)

same here....

python3-setuptools is already the newest version (68.1.2-2ubuntu1)

Following the instructions on https://wiki.bazarr.media/Getting-Started/Installation/Linux/linux/

`/opt/bazarr$ python3 bazarr.py
Python version greater than 3.11.x is unsupported. Current version is 3.12.3. Keep in mind that even if it works, you're on your own.
Bazarr starting child process with PID 628794...
/opt/bazarr/bazarr/../custom_libs/subzero/language.py:165: SyntaxWarning: invalid escape sequence '.'
IETF_MATCH = ".+.([^-.]+)(?:-[A-Za-z]+)?$"
/opt/bazarr/bazarr/../custom_libs/subzero/language.py:166: SyntaxWarning: invalid escape sequence '.'
ENDSWITH_LANGUAGECODE_RE = re.compile(".([^-.]{2,3})(?:-[A-Za-z]{2,})?$")
/opt/bazarr/bazarr/../custom_libs/subzero/language.py:170: SyntaxWarning: invalid escape sequence '.'
language_match = re.match(".+.([^\.]+)$" if not ietf
2024-08-18 20:34:04,895 - root (7a5298895080) : ERROR (check_update:174) - BAZARR unable to unzip release
Traceback (most recent call last):
File "/opt/bazarr/bazarr/../libs/sqlalchemy/engine/base.py", line 1960, in _exec_single_context
self.dialect.do_execute(
File "/opt/bazarr/bazarr/../libs/sqlalchemy/engine/default.py", line 924, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: attempt to write a readonly database

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/bazarr/bazarr/main.py", line 51, in
migrate_db(app)
File "/opt/bazarr/bazarr/app/database.py", line 327, in migrate_db
flask_migrate.upgrade(directory=migrations_directory)
File "/opt/bazarr/bazarr/../libs/flask_migrate/init.py", line 111, in wrapped
f(*args, **kwargs)
File "/opt/bazarr/bazarr/../libs/flask_migrate/init.py", line 200, in upgrade
command.upgrade(config, revision, sql=sql, tag=tag)
File "/opt/bazarr/bazarr/../libs/alembic/command.py", line 403, in upgrade
script.run_env()
File "/opt/bazarr/bazarr/../libs/alembic/script/base.py", line 583, in run_env
util.load_python_file(self.dir, "env.py")
File "/opt/bazarr/bazarr/../libs/alembic/util/pyfiles.py", line 95, in load_python_file
module = load_module_py(module_id, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/bazarr/bazarr/../libs/alembic/util/pyfiles.py", line 113, in load_module_py
spec.loader.exec_module(module) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 995, in exec_module
File "", line 488, in call_with_frames_removed
File "/opt/bazarr/migrations/env.py", line 117, in
run_migrations_online()
File "/opt/bazarr/migrations/env.py", line 106, in run_migrations_online
context.run_migrations()
File "", line 8, in run_migrations
File "/opt/bazarr/bazarr/../libs/alembic/runtime/environment.py", line 948, in run_migrations
self.get_context().run_migrations(**kw)
File "/opt/bazarr/bazarr/../libs/alembic/runtime/migration.py", line 627, in run_migrations
step.migration_fn(**kw)
File "/opt/bazarr/migrations/versions/1e38aa77a491
.py", line 31, in upgrade
with op.batch_alter_table('table_history', schema=None) as batch_op:
File "/usr/lib/python3.12/contextlib.py", line 144, in exit
next(self.gen)
File "/opt/bazarr/bazarr/../libs/alembic/operations/base.py", line 398, in batch_alter_table
impl.flush()
File "/opt/bazarr/bazarr/../libs/alembic/operations/batch.py", line 164, in flush
batch_impl._create(self.impl)
File "/opt/bazarr/bazarr/../libs/alembic/operations/batch.py", line 448, in _create
op_impl.create_table(self.new_table)
File "/opt/bazarr/bazarr/../libs/alembic/ddl/impl.py", line 366, in create_table
self._exec(schema.CreateTable(table))
File "/opt/bazarr/bazarr/../libs/alembic/ddl/impl.py", line 207, in _exec
return conn.execute(construct, multiparams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/bazarr/bazarr/../libs/sqlalchemy/engine/base.py", line 1408, in execute
return meth(
^^^^^
File "/opt/bazarr/bazarr/../libs/sqlalchemy/sql/ddl.py", line 180, in _execute_on_connection
return connection._execute_ddl(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/bazarr/bazarr/../libs/sqlalchemy/engine/base.py", line 1519, in _execute_ddl
ret = self._execute_context(
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/bazarr/bazarr/../libs/sqlalchemy/engine/base.py", line 1839, in _execute_context
return self._exec_single_context(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/bazarr/bazarr/../libs/sqlalchemy/engine/base.py", line 1979, in _exec_single_context
self._handle_dbapi_exception(
File "/opt/bazarr/bazarr/../libs/sqlalchemy/engine/base.py", line 2335, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/opt/bazarr/bazarr/../libs/sqlalchemy/engine/base.py", line 1960, in _exec_single_context
self.dialect.do_execute(
File "/opt/bazarr/bazarr/../libs/sqlalchemy/engine/default.py", line 924, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) attempt to write a readonly database
[SQL:
CREATE TABLE _alembic_tmp_table_history (
id INTEGER NOT NULL,
action INTEGER NOT NULL,
description TEXT NOT NULL,
language TEXT,
provider TEXT,
score INTEGER,
"sonarrEpisodeId" INTEGER,
"sonarrSeriesId" INTEGER,
subs_id TEXT,
subtitles_path TEXT,
timestamp DATETIME NOT NULL,
video_path TEXT,
matched TEXT,
not_matched TEXT,
"upgradedFromId" INTEGER,
PRIMARY KEY (id),
CONSTRAINT "fk_history_upgradedFromId_id" FOREIGN KEY("upgradedFromId") REFERENCES table_history (id),
FOREIGN KEY("sonarrSeriesId") REFERENCES table_shows ("sonarrSeriesId") ON DELETE CASCADE,
FOREIGN KEY("sonarrEpisodeId") REFERENCES table_episodes ("sonarrEpisodeId") ON DELETE CASCADE
)

]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
`

from bazarr.

DannyJanmaat avatar DannyJanmaat commented on September 25, 2024

I didn't had time to solve this, I hope the creator of this tool get this working again. You can temp get this working by using a earlier python version in a venv environment.

from bazarr.

MaZchen avatar MaZchen commented on September 25, 2024

I didn't had time to solve this, I hope the creator of this tool get this working again. You can temp get this working by using a earlier python version in a venv environment.

thanks. Unfortunately I am not that familiar with Linux. I tried to follow the instructions given in this issue and related ones, but without success.... I think to remember I had read in a related issue that almost 50% seem so run fine in Python 3.12, just don't see how.

from bazarr.

DannyJanmaat avatar DannyJanmaat commented on September 25, 2024

DistUtils is deprecated; that's why you need to use the older version for direct result.

Else you have to install a 3th party Setuptools for it to work. I had it working, except I ran it from a LXC (Proxmox) and it don't have direct full support for virtual environments.

I have a vacation coming, maybe I will have time for this

from bazarr.

MaZchen avatar MaZchen commented on September 25, 2024

Ok so I've deployed an Ubuntu 24.04 virtual machine, followed the wiki with some adaptations:

works! Thanks a million!

from bazarr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.