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

Label printer plugin does not work #7245

Open
3 of 6 tasks
HannesMorre opened this issue May 16, 2024 · 19 comments
Open
3 of 6 tasks

Label printer plugin does not work #7245

HannesMorre opened this issue May 16, 2024 · 19 comments
Labels
bug Identifies a bug which needs to be addressed plugin Plugin ecosystem question This is a question report Report generation
Milestone

Comments

@HannesMorre
Copy link

HannesMorre commented May 16, 2024

Please verify that this bug has NOT been raised before.

  • I checked and didn't find a similar issue

Describe the bug*

We installed the inventree-zebra-plugin and it seems to have been installed correctly, but when we try to print a label we get this error:

Plugin registry has no record of plugin 'zebra'
Could not find matching plugin for 'zebra'

This is the plugins.txt file:
image

And the config:
image

The plugin was installed through the settings page first, but we also tried to install it with pip install.

Steps to Reproduce

  1. install the plugin from the plugin settings window with package name: inventree-zebra-plugin
  2. try to print a label

Expected behaviour

The label is printed from the zebra printer.

Deployment Method

  • Docker
  • Package
  • Bare metal
  • Other - added info in Steps to Reproduce

Version Information

Version Information:

InvenTree-Version: 0.14.4
Django Version: 4.2.11
Commit Hash: 35fc954
Commit Date: 2024-03-22

Database: postgresql
Debug-Mode: False
Deployed using Docker: True
Platform: Linux-5.10.0-28-amd64-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': 'SupplierCart', 'slug': 'suppliercart', 'version': '0.4.0'}, {'name': 'RapidocPlugin', 'slug': 'inventree-rapidoc', 'version': '1.1'}, {'name': 'Zebra', 'slug': 'zebra', 'version': '0.5.2'}]

Please verify if you can reproduce this bug on the demo site.

  • I can reproduce this bug on the demo site.

Relevant log output

No response

@HannesMorre HannesMorre added bug Identifies a bug which needs to be addressed question This is a question triage:not-checked Item was not checked by the core team labels May 16, 2024
@SchrodingersGat
Copy link
Member

Are you trying to print via the web interface? Or via an external API call? Where are you seeing the error message.

@SchrodingersGat SchrodingersGat added plugin Plugin ecosystem report Report generation and removed triage:not-checked Item was not checked by the core team labels May 16, 2024
@HannesMorre
Copy link
Author

Yes we are trying to print from the web interface and the error message comes from the inventree worker

@SergeoLacruz
Copy link
Contributor

Hmmm...
I have seen this already some time ago but I do not exactly remember the reason.The issue was solved.
May be something like #3878 ?

@wolflu05
Copy link
Contributor

It could be that the printer plugin is simply not installed on the worker, therefore the plugin cannot be found when the worker is trying to load it.

@HannesMorre
Copy link
Author

HannesMorre commented May 17, 2024

I noticed however that yesterday the label was not printed, so I tried to download the label in pdf format and send this to the printer. this however did not work either.
The weird thing is that today when I arrived at work, there is a label printed and no one knows how.

@lqdmist
Copy link

lqdmist commented May 17, 2024

I am a co-worker of @HannesMorre.
The plugin seems to be installed on the worker:

/home/inventree # pip3 install inventree-zebra-plugin
Requirement already satisfied: inventree-zebra-plugin in /usr/local/lib/python3.11/site-packages (0.5.2)
Requirement already satisfied: zpl>=0.1.11 in /usr/local/lib/python3.11/site-packages (from inventree-zebra-plugin) (0.1.11)
Requirement already satisfied: Pillow in /root/.local/lib/python3.11/site-packages (from zpl>=0.1.11->inventree-zebra-plugin) (10.2.0)```

@HannesMorre
Copy link
Author

@SchrodingersGat @wolflu05 @SergeoLacruz
Anything else that can be done here?

@SergeoLacruz
Copy link
Contributor

Try to install the brother printer. This is very similar and should work. I cannot reproduce it here

@HannesMorre
Copy link
Author

so the brotherprinter plugin should work with the zebra printer?
Because we do not have a network connected brother printer 😅

@SergeoLacruz
Copy link
Contributor

Of course not.
But the brother plugin should at least properly start and send the print somewhere....
You will see an error in the log if the printer cannot be reached. But that is OK for this test.

@HannesMorre
Copy link
Author

inventree-worker  | 2024-05-24T09:20:06.065477270Z Plugin registry has no record of plugin 'brother'
inventree-worker  | 2024-05-24T09:20:06.065638119Z Could not find matching plugin for 'brother'

Still happening

@wolflu05
Copy link
Contributor

Sorry, it's really hard, I cannot reproduce this. Are you sure, that:

  • the plugin is really installed in the inventree-worker container (exec into it via docker compose exec -it bash inventree-worker and then check via pip freeze | grep brother (and also for zebra)
  • the plugin is activated on the inventree instance (goto the settings > plugins, or into the Admin Center of Platform UI)

If all of the above is true, please enable debug logs and provide the full log output from the server and the worker container (redact any sensitive values)

@SchrodingersGat
Copy link
Member

This will be

A) potentially hard to track down and debug
B) crucial that we do understand what is going on

Please try and provide the log / debug information as requested by @wolflu05 above. I don't have any time right now to look into this but if it is still open next week I can jump in and try to reproduce

@SchrodingersGat SchrodingersGat added this to the 0.16.0 milestone May 24, 2024
@HannesMorre
Copy link
Author

Could #6733 be a possible fix?

@HannesMorre
Copy link
Author

@lqdmist can you provide the requested logs/debug information?

@wolflu05
Copy link
Contributor

Could #6733 be a possible fix?

That was already back ported to 0.14.3, and from the initial comment it seems that you are already using 0.14.4.

@lqdmist
Copy link

lqdmist commented May 24, 2024

The plugins are installed in the worker container:

tcit@docker:/opt/deployment/inventree$ docker exec -it inventree-worker ash
/home/inventree # pip freeze | grep brother
brother-ql-inventree==1.1
inventree-brother-plugin==0.9.0
/home/inventree # pip freeze | grep zebra
inventree-zebra-plugin==0.5.2

@HannesMorre
Copy link
Author

And the plugin is activated as well
image

@SchrodingersGat
Copy link
Member

@HannesMorre I have just rolled back to 0.14.4 and installed the zebra plugin. With the background worker running, I get the following error message:

image

This indicates that the plugin code is running.

Have you tried stopping and restarting the "background worker" docker container?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Identifies a bug which needs to be addressed plugin Plugin ecosystem question This is a question report Report generation
Projects
None yet
Development

No branches or pull requests

5 participants