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

Error printing label cannot import name 'ImageDraw' from 'PIL' (/root/.local/lib/python3.11/site-packages/PIL/__init__.py) #8742

Open
2 of 6 tasks
Agilitytime opened this issue Dec 23, 2024 · 5 comments
Labels
bug Identifies a bug which needs to be addressed question This is a question report Report/Label generation

Comments

@Agilitytime
Copy link

Please verify that this bug has NOT been raised before.

  • I checked and didn't find a similar issue

Describe the bug*

Hi,

its not possible to print a label.
After clicking on the Print button, the following error code plobs up.

Error printing label

cannot import name 'ImageDraw' from 'PIL' (/root/.local/lib/python3.11/site-packages/PIL/init.py)

it dusent matter, whitch Print method is used.

Steps to Reproduce

1 go to Print Actions
2 Print Label

Expected behaviour

Print a Label or Generate PDF

Deployment Method

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

Version Information

New Deployed Version, now Update etc.

77ae06b03ba5 inventree/inventree:stable "/bin/ash ./init.sh …" 21 minutes ago Up 21 minutes 8000/tcp inventree-worker
16124c1834c1 caddy:alpine "caddy run --config …" 21 minutes ago Up 21 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 443/udp, 2019/tcp inventree-proxy
db55c3ab38f9 inventree/inventree:stable "/bin/ash ./init.sh …" 21 minutes ago Up 21 minutes 8000/tcp inventree-server
6bbe316798dc postgres:13 "docker-entrypoint.s…" 21 minutes ago Up 21 minutes 5432/tcp inventree-db
478056b8e58f redis:7.0 "docker-entrypoint.s…" 21 minutes ago Up 21 minutes 6379/tcp

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

  • I can reproduce this bug on the demo site.

Relevant log output

@Agilitytime Agilitytime 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 Dec 23, 2024
@SchrodingersGat
Copy link
Member

@Agilitytime please include the full error log - which should be available via the admin interface

If you are not seeing any error messages there you may need to enable the Log Report Errors setting

@gab696
Copy link

gab696 commented Dec 29, 2024

Hi,
I have the same problem, Did you found a solution ?

@SchrodingersGat
Copy link
Member

@gab696 are you using docker also?

@gab696
Copy link

gab696 commented Dec 30, 2024

@gab696 are you using docker also?

Yes, a fresh install of the last stable release 0.17.1 / Debian 11

@SchrodingersGat
Copy link
Member

@gab696 I cannot reproduce this on what I think is the same setup. Label printing works just fine!

Can you please share the following:

System Information

Image

Version Info

> docker compose run --rm inventree-server invoke version
InvenTree - inventree.org
The Open-Source Inventory Management System


Python paths:
Executable  /usr/local/bin/python
Environment /usr/local

Installation paths:
Base        /home/inventree
Config      /home/inventree/data/config.yaml
Media       /home/inventree/data/media
Static      /home/inventree/data/static

Versions:
Python      3.11.9
Django      4.2.17
InvenTree   0.17.1
API         294
Node        N/A
Yarn        N/A

Commit hash: eed6223
Commit date: 2024-12-26

PIL Library Version

> docker compose run --rm inventree-server pip show pillow
Name: pillow
Version: 11.0.0
Summary: Python Imaging Library (Fork)
Home-page:
Author:
Author-email: "Jeffrey A. Clark" <aclark@aclark.net>
License: MIT-CMU
Location: /root/.local/lib/python3.11/site-packages
Requires:
Required-by: django-stdimage, pdf2image, weasyprint

SchrodingersGat pushed a commit that referenced this issue Dec 31, 2024
…ke OSs (#8793)

* do not install with uv for now - fixes #8789
#8742 #8495 #8494

* Ensure errors are raised if install / update fails
github-actions bot pushed a commit that referenced this issue Dec 31, 2024
…ke OSs (#8793)

* do not install with uv for now - fixes #8789
#8742 #8495 #8494

* Ensure errors are raised if install / update fails

(cherry picked from commit d7939ef)
SchrodingersGat pushed a commit that referenced this issue Dec 31, 2024
…ke OSs (#8793) (#8813)

* do not install with uv for now - fixes #8789
#8742 #8495 #8494

* Ensure errors are raised if install / update fails

(cherry picked from commit d7939ef)

Co-authored-by: Matthias Mair <code@mjmair.com>
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 question This is a question report Report/Label generation
Projects
None yet
Development

No branches or pull requests

3 participants