Skip to content

Unknown command: collectplugins #11489

@inscrut

Description

@inscrut

Deployment Method

  • Installer
  • Docker Development
  • Docker Production
  • Bare metal Development
  • Bare metal Production
  • Digital Ocean image
  • Other (please provide a link Steps to Reproduce

Describe the problem*

Installing required python packages from '/home/inventree/src/config/plugins.txt'
2026-03-11 02:43:32,032 DEBUG Loading SECRET_KEY from '/home/inventree/src/config/secret_key.txt'
2026-03-11 02:43:32,033 DEBUG {'event': 'Configuring database backend:', 'timestamp': '2026-03-11T07:43:32.033656Z', 'logger': 'inventree', 'level': 'debug'}
2026-03-11 02:43:32,033 INFO {'event': 'DB_ENGINE: django.db.backends.postgresql', 'timestamp': '2026-03-11T07:43:32.033846Z', 'logger': 'inventree', 'level': 'info'}
2026-03-11 02:43:32,034 INFO {'event': 'DB_NAME: invneo', 'timestamp': '2026-03-11T07:43:32.033981Z', 'logger': 'inventree', 'level': 'info'}
2026-03-11 02:43:32,034 INFO {'event': 'DB_HOST: db.test.dmz', 'timestamp': '2026-03-11T07:43:32.034102Z', 'logger': 'inventree', 'level': 'info'}
**Unknown command: 'collectplugins'**
Type 'manage.py help' for usage.
Exception ignored in: <function PackBasedObjectStore.__del__ at 0x7b80878e3880>
Traceback (most recent call last):
  File "/home/inventree/env/lib/python3.12/site-packages/dulwich/object_store.py", line 1020, in __del__
ImportError: sys.meta_path is None, Python is likely shutting down
Exception ignored in: <function Pack.__del__ at 0x7b8087b90c20>
Traceback (most recent call last):
  File "/home/inventree/env/lib/python3.12/site-packages/dulwich/pack.py", line 4154, in __del__
ImportError: sys.meta_path is None, Python is likely shutting down
Exception ignored in: <function PackData.__del__ at 0x7b8087b77240>
Traceback (most recent call last):
  File "/home/inventree/env/lib/python3.12/site-packages/dulwich/pack.py", line 1879, in __del__
ImportError: sys.meta_path is None, Python is likely shutting down
ERROR: InvenTree command failed: 'python3 manage.py collectplugins'
- Refer to the error messages in the log above for more information

manage.py:

(env) inventree@inventreetemp:~/src/src/backend/InvenTree$ ./manage.py help
2026-03-11 03:49:50,494 DEBUG Loading SECRET_KEY from '/home/inventree/src/config/secret_key.txt'
2026-03-11 03:49:50,496 DEBUG {'event': 'Configuring database backend:', 'timestamp': '2026-03-11T08:49:50.495976Z', 'logger': 'inventree', 'level': 'debug'}
2026-03-11 03:49:50,496 INFO {'event': 'DB_ENGINE: django.db.backends.postgresql', 'timestamp': '2026-03-11T08:49:50.496138Z', 'logger': 'inventree', 'level': 'info'}
2026-03-11 03:49:50,496 INFO {'event': 'DB_NAME: invneo', 'timestamp': '2026-03-11T08:49:50.496232Z', 'logger': 'inventree', 'level': 'info'}
2026-03-11 03:49:50,496 INFO {'event': 'DB_HOST: db.test.dmz', 'timestamp': '2026-03-11T08:49:50.496312Z', 'logger': 'inventree', 'level': 'info'}

Type 'manage.py help <subcommand>' for help on a specific subcommand.

Available subcommands:

[django]
    check
    compilemessages
    createcachetable
    dbshell
    diffsettings
    dumpdata
    flush
    inspectdb
    loaddata
    makemessages
    makemigrations
    migrate
    optimizemigration
    runserver
    sendtestemail
    shell
    showmigrations
    sqlflush
    sqlmigrate
    sqlsequencereset
    squashmigrations
    startapp
    startproject
    test
    testserver
Note that only Django core commands are listed as settings are not properly configured (error: No module named 'psycopg2').
Exception ignored in: <function PackBasedObjectStore.__del__ at 0x73e91d0d3880>
Traceback (most recent call last):
  File "/home/inventree/env/lib/python3.12/site-packages/dulwich/object_store.py", line 1020, in __del__
ImportError: sys.meta_path is None, Python is likely shutting down
Exception ignored in: <function Pack.__del__ at 0x73e91d098c20>
Traceback (most recent call last):
  File "/home/inventree/env/lib/python3.12/site-packages/dulwich/pack.py", line 4154, in __del__
ImportError: sys.meta_path is None, Python is likely shutting down
Exception ignored in: <function PackData.__del__ at 0x73e91d2f3240>
Traceback (most recent call last):
  File "/home/inventree/env/lib/python3.12/site-packages/dulwich/pack.py", line 1879, in __del__
ImportError: sys.meta_path is None, Python is likely shutting down

(env) inventree@inventreetemp:~/src/src/backend/InvenTree$ pip install psycopg2-binary

after that, invoke update will work.

May be need add psycopg2 in req.txt ?

Steps to Reproduce

useradd -m -d /home/inventree -s /bin/bash inventree
usermod -aG sudo inventree
su - inventree
sudo apt update
sudo apt-get install python3 python3-dev python3-pip python3-invoke python3-venv git gcc g++ gettext gnupg poppler-utils libpango-1.0-0 libpangoft2-1.0-0 libjpeg-dev webp
cd ~/
git clone https://github.com/inventree/inventree src
python3 -m venv env
source ./env/bin/activate
pip install --upgrade --ignore-installed invoke
pip3 install psycopg pgcli
cd src/
nano config/config.yaml
nano /home/inventree/src/config/admin_password.txt
mkdir -p /home/inventree/data/media
mkdir -p /home/inventree/data/static
mkdir -p /home/inventree/data/backup
sudo apt-get install postgresql-client
sudo -u postgres psql
CREATE USER invneo WITH PASSWORD '1234';

CREATE DATABASE invneo OWNER invneo;

GRANT ALL PRIVILEGES ON DATABASE invneo TO invneo;


GRANT ALL ON SCHEMA public TO invneo;

ALTER SCHEMA public OWNER TO invneo;

\q
invoke install --skip-plugins
cd /home/inventree/src
invoke update --skip-backup --no-frontend
invoke update

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionThis is a questionsetupRelates to the InvenTree setup / installation processtriage:not-checkedItem was not checked by the core team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions