-
-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error import-records #8942
Comments
Hi there! Switching between Python versions in the os is not really supported. Your virtual environment will probably point to old references and not work anymore. |
On the new VM I used package installer: After that, Inventree was installed and I tried to import the database from the old VM (which was installed via Docker). |
@Noscopes063 it looks like you have the wrong version of invoke installed on your new system. https://docs.inventree.org/en/stable/start/invoke/?h=invoke We need at least |
@SchrodingersGat not sure this was the issue from the traceback. @Noscopes063 can you confirm this fixed your issue? |
In new VM Invoke was less then 2.0, it's true. So, I install the new VM Ubuntu 20.04. Update and upgrade it. $ invoke --version Use this command from manual: Installation completed successfully. $ python3 --version If I update Python version I have another many errors. |
You need to solve these errors first - our installation guide assumes that you have the required packages installed.. |
Please verify that this bug has NOT been raised before.
Describe the bug*
Hello!
I had installed Inventree via docker on Ubuntu 24.04. After that I needed to create a separate OS (I install Ubuntu 20.04). I copied the database from docker, moved it to another VM and an error occurs during import.
Database on docker and Ubuntu are differents.
Docker - postgresql. Ubuntu - sqlite3.
Version Python too.
Docker - 3.11.9. Ubuntu - 3.9.5.
I update version Python on Ubuntu on 3.11.11, but in web I see old version.
Could you please tell me what the problem?
Steps to Reproduce
root@auxo-server:/opt/inventree/data# invoke import-records -c -f data-auxo.json
Traceback (most recent call last):
File "/usr/bin/invoke", line 11, in
load_entry_point('invoke==1.3.0', 'console_scripts', 'invoke')()
File "/usr/lib/python3/dist-packages/invoke/program.py", line 373, in run
self.parse_collection()
File "/usr/lib/python3/dist-packages/invoke/program.py", line 465, in parse_collection
self.load_collection()
File "/usr/lib/python3/dist-packages/invoke/program.py", line 696, in load_collection
module, parent = loader.load(coll_name)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/invoke/loader.py", line 76, in load
module = imp.load_module(name, fd, path, desc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/imp.py", line 235, in load_module
return load_source(name, filename, file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/imp.py", line 172, in load_source
module = _load(spec)
^^^^^^^^^^^
File "", line 721, in _load
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/opt/inventree/tasks.py", line 261, in
@task(help={'uv': 'Use UV (experimental package manager)'})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/invoke/tasks.py", line 338, in inner
obj = klass(
^^^^^^
File "/usr/lib/python3/dist-packages/invoke/tasks.py", line 76, in init
self.positional = self.fill_implicit_positionals(positional)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/invoke/tasks.py", line 167, in fill_implicit_positionals
args, spec_dict = self.argspec(self.body)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/invoke/tasks.py", line 153, in argspec
spec = inspect.getargspec(func)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
Expected behaviour
Import data from docker in new database on ubuntu.
Deployment Method
Version Information
Docker:
Version Information:
InvenTree-Version: 0.17.2
Django Version: 4.2.17
Commit Hash: 4b56492
Commit Date: 2025-01-07
Database: postgresql
Debug-Mode: False
Deployed using Docker: True
Platform: Linux-6.8.0-51-generic-x86_64-with
Installer: DOC
Active plugins: [{'name': 'InvenTreeBarcode', 'slug': 'inventreebarcode', 'version': '2.1.0'}, {'name': 'InvenTreeCoreNotificationsPlugin', 'slug': 'inventreecorenotificationsplugin', 'version': '1.0.0'}, {'name': 'InvenTreeCurrencyExchange', 'slug': 'inventreecurrencyexchange', 'version': '1.0.0'}, {'name': 'InvenTreeLabel', 'slug': 'inventreelabel', 'version': '1.1.0'}, {'name': 'InvenTreeLabelMachine', 'slug': 'inventreelabelmachine', 'version': '1.0.0'}, {'name': 'InvenTreeLabelSheet', 'slug': 'inventreelabelsheet', 'version': '1.0.0'}, {'name': 'DigiKeyPlugin', 'slug': 'digikeyplugin', 'version': '1.0.0'}, {'name': 'LCSCPlugin', 'slug': 'lcscplugin', 'version': '1.0.0'}, {'name': 'MouserPlugin', 'slug': 'mouserplugin', 'version': '1.0.0'}, {'name': 'TMEPlugin', 'slug': 'tmeplugin', 'version': '1.0.0'}]
Ubuntu 20.04:
Version Information:
InvenTree-Version: 0.17.2
Django Version: 4.2.17
Database: sqlite3
Debug-Mode: False
Deployed using Docker: False
Platform: Linux-5.4.0-204-generic-x86_64-with-glibc2.31
Installer: None
Active plugins: [{'name': 'InvenTreeBarcode', 'slug': 'inventreebarcode', 'version': '2.1.0'}, {'name': 'InvenTreeCoreNotificationsPlugin', 'slug': 'inventreecorenotificationsplugin', 'version': '1.0.0'}, {'name': 'InvenTreeCurrencyExchange', 'slug': 'inventreecurrencyexchange', 'version': '1.0.0'}, {'name': 'InvenTreeLabel', 'slug': 'inventreelabel', 'version': '1.1.0'}, {'name': 'InvenTreeLabelMachine', 'slug': 'inventreelabelmachine', 'version': '1.0.0'}, {'name': 'InvenTreeLabelSheet', 'slug': 'inventreelabelsheet', 'version': '1.0.0'}, {'name': 'DigiKeyPlugin', 'slug': 'digikeyplugin', 'version': '1.0.0'}, {'name': 'LCSCPlugin', 'slug': 'lcscplugin', 'version': '1.0.0'}, {'name': 'MouserPlugin', 'slug': 'mouserplugin', 'version': '1.0.0'}, {'name': 'TMEPlugin', 'slug': 'tmeplugin', 'version': '1.0.0'}]
Please verify if you can reproduce this bug on the demo site.
Relevant log output
The text was updated successfully, but these errors were encountered: