module 'PIL.Image' has no attribute 'ANTIALIAS'

Đang mở
#6,853 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
data-visualization

Hướng nghiên cứu

Bắt đầu tại writer.add_figure và lần theo đường dẫn add_images của nó để xác định tham chiếu PIL.Image.ANTIALIAS. Tái hiện lỗi với một Matplotlib Figure và môi trường Pillow 10.3.0 được báo cáo. Hoàn tất khi việc thêm một figure không còn gây ra AttributeError này.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Environment information (required)

Linux:
image

cuda 11.4
pytorch 1.12.1
Python 3.8.18
PIL 10.3.0
tensorboard 2.14.0

I setup the environment by :
$ conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch

Issue description

When using writer.add_figure to add a figure, there is a Error:

AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

The original code line in my project is:
writer.add_figure('indicator/CM', fig)
fig is a matplotlib Figure, where a confusion matrix is drawn.

It seems in the process of add_images of add_figure , it is attempted to get the attribute ANTIALIAS of PIL.Image. BUT in the recent update, it was removed! Since version 10.0.0, ANTIALIAS was already removed, but add_figure method still needs it.
image

Reproduce the problem

Add a figure to a writer. The figure draws a confusion matrix.
This should reproduce the problem.

Ngôn ngữ chính
TypeScript
Star
7.2k
Fork
1.7k
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tensorflow/tensorboard

Tất cả issue của tensorflow/tensorboard

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.