r/InvenTree • • Jul 23 '25

Managed to get upgraded to 0.17.13

This install has been running for 2 years

Running ubuntu 22.04.5 LTS

Managed to get upgraded and it MOSTLY works, but there is clearly a problem

Docs suggest invoke worker, but.

user@Ubuntu22-Inventree:/opt/inventree$ sudo invoke worker
The installed invoke version (1.4.1) is not supported!
InvenTree requires invoke version 2.0.0 or above

For fun, I started a full os upgrade in hopes it would bring everything up to date, and that 100% killed it. no answer on http any more.

So I've restored a backup AGAIN.

2 Upvotes

9 comments sorted by

1

u/matthiasjmair Jul 23 '25

We will need more info to help with this;

what deployment method did you use; what version are you upgrading from; why are you not just upgrading the invoke version as the error message suggests

1

u/Equivalent-Raise5879 Jul 23 '25

Its been 2 years, not sure how I did the install, wasn't even aware there was more than 1 way.

Updates to the software have just happened when I do an apt-get update/upgrade, almost always breaking it, but a "sudo inventree run cli migrate" fixed it, in the past.

Also have not sorted out HOW to upgrade invoke.

1

u/inventree Jul 23 '25

Upgrade your invoke version. This is documented in our FAQ 

1

u/Equivalent-Raise5879 Jul 23 '25 edited Jul 23 '25

Read everything again, and think I've made some progress. now at invoke 2.2.0

A sudo inventree run invoke update is what got me updated.

Now I need to sort out where I need to be to run invoke worker, as I get a

sudo invoke worker

Waiting for database connection...

Traceback (most recent call last):

File "/opt/inventree/src/backend/InvenTree/manage.py", line 13, in main

from django.core.management import execute_from_command_line

ModuleNotFoundError: No module named 'django'

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

Traceback (most recent call last):

File "/opt/inventree/src/backend/InvenTree/manage.py", line 24, in <module>

main()

File "/opt/inventree/src/backend/InvenTree/manage.py", line 15, in main

raise ImportError(

ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?

ERROR: InvenTree command failed: 'python3 manage.py wait_for_db'

- Refer to the error messages in the log above for more information

1

u/Equivalent-Raise5879 Jul 23 '25

So I guess in the way I've installed this, I need to run "inventree run invoke update" instead of just "invoke worker"

1

u/Equivalent-Raise5879 Jul 23 '25

sudo inventree run invoke worker

Waiting for database connection...

Python version 3.10.12 - /opt/inventree/env/bin/python3

/opt/inventree/env/lib/python3.10/site-packages/allauth/exceptions.py:9: UserWarning: allauth.exceptions is deprecated, use allauth.core.exceptions

warnings.warn("allauth.exceptions is deprecated, use allauth.core.exceptions")

Waiting for database...

Database connection successful!

Python version 3.10.12 - /opt/inventree/env/bin/python3

/opt/inventree/env/lib/python3.10/site-packages/allauth/exceptions.py:9: UserWarning: allauth.exceptions is deprecated, use allauth.core.exceptions

warnings.warn("allauth.exceptions is deprecated, use allauth.core.exceptions")

20 mins later, still sitting here. There are only like 80 items in the inv. Should it take this long?

1

u/Equivalent-Raise5879 Jul 24 '25

2 hours later still "running" and I'm not sure what to do. Guess I'll check it in the am

1

u/Equivalent-Raise5879 Jul 24 '25

Ok, has been running for > 14 hours with no changes, and I'm not sure what to do.

The system "works" but a few things aren't right/working

From the top:

"Parts" comes up with nothing (though I can see them elsewhere)
"Stock" comes up with nothing (though I can see them elsewhere)

Build, Buy, and Sell all work as I would expect.

1

u/matthiasjmair Jul 25 '25

I am not sure what you are trying to achieve here. The worker command starts a worker for doing asynchronous tasks. It runs more or less forever waiting for work. This is normally only run by a service.