Skip to content
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

0.4.0 locator issue #12

Open
matmair opened this issue Jul 3, 2024 · 8 comments
Open

0.4.0 locator issue #12

matmair opened this issue Jul 3, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@matmair
Copy link
Member

matmair commented Jul 3, 2024

          ok that works!  
File "/home/inventree/src/backend/InvenTree/InvenTree/tasks.py", line 212, in offload_task
task.run()

File "/root/.local/lib/python3.11/site-packages/django_q/tasks.py", line 727, in run
self.id = async_task(self.func, *self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/root/.local/lib/python3.11/site-packages/django_q/tasks.py", line 70, in async_task
pack = SignedPackage.dumps(task)
^^^^^^^^^^^^^^^^^^^^^^^^^

File "/root/.local/lib/python3.11/site-packages/django_q/signing.py", line 15, in dumps
return signing.dumps(
^^^^^^^^^^^^^^

File "/root/.local/lib/python3.11/site-packages/django/core/signing.py", line 152, in dumps
return TimestampSigner(key=key, salt=salt).sign_object(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/root/.local/lib/python3.11/site-packages/django/core/signing.py", line 250, in sign_object
data = serializer().dumps(obj)
^^^^^^^^^^^^^^^^^^^^^^^

File "/root/.local/lib/python3.11/site-packages/django_q/signing.py", line 35, in dumps
return pickle.dumps(obj, protocol=pickle.HIGHEST_PROTOCOL)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

AttributeError: Can't pickle local object 'View.as_view.<locals>.view'

Originally posted by @PricelessToolkit in #7 (comment)

@matmair
Copy link
Member Author

matmair commented Jul 3, 2024

@PricelessToolkit are you sure this is the error that is triggered? I am asking because the locator function is not calling any offliading
grafik

@matmair matmair self-assigned this Jul 3, 2024
@matmair matmair added the bug Something isn't working label Jul 3, 2024
@PricelessToolkit
Copy link

PricelessToolkit commented Jul 3, 2024

Yes, I tried several times.

err

@matmair
Copy link
Member Author

matmair commented Jul 4, 2024

Ok, I will have to dig into this then. I can not reproduce it on my docker dev setup.
Could you post your version information? It is provided in the upper right corner of the UI in the dropdown (there is a "copy version information" button - that provides a bit more info than is shown in the UI)

@PricelessToolkit
Copy link

Version Information:

InvenTree-Version: 0.15.4
Django Version: 4.2.12
Commit Hash: fa1a9da
Commit Date: 16-06-2024

Database: postgresql
Debug-Mode: False
Deployed using Docker: True
Platform: Linux-6.8.4-2-pve-x86_64-with
Installer: DOC

Active plugins: [{'name': 'InvenTreeBarcode', 'slug': 'inventreebarcode', 'version': '2.0.0'}, {'name': 'InvenTreeCoreNotificationsPlugin', 'slug': 'inventreecorenotificationsplugin', 'version': '1.0.0'}, {'name': 'InvenTreeCurrencyExchange', 'slug': 'inventreecurrencyexchange', 'version': '1.0.0'}, {'name': 'InvenTreeLabel', 'slug': 'inventreelabel', 'version': '1.0.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'}, {'name': 'Wireviz', 'slug': 'wireviz', 'version': '0.6.0'}, {'name': 'WledPlugin', 'slug': 'inventree-wled-locator', 'version': '0.4.0'}, {'name': 'SupplierCart', 'slug': 'suppliercart', 'version': '0.3.1'}, {'name': 'KiCadLibraryPlugin', 'slug': 'kicad-library-plugin', 'version': '1.4.0'}]

@philipp2310
Copy link

This was posted on the official InvenTree tracker as well:
inventree/InvenTree#7489

Same issue for me as well (non docker, running with 4 workers)

@philipp2310
Copy link

quick fix, and dirty:

I locally modified

/opt/inventree/src/backend/InvenTree/plugin/base/locate/api.py

in lines 63 and 81 to include

force_sync=True

Surely not the perfect solution (even if done centrally by InvenTree) as locating should be done asynchronously, but it works for now

@PricelessToolkit
Copy link

I hope this will be fixed in the next version.

@rieders
Copy link

rieders commented Oct 2, 2024

Hello

I have installed wled v 0.2.2 on my Inventree instance.

How can I upgrade it to 0.4.0?

Greetings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

4 participants