First time here? Check out the FAQ!

Ask Your Question
0

Type error using PIL - Integer doesn't support round method

asked 0 years ago

PatB gravatar image

updated 0 years ago

strong textThis error was reported 6 years ago, https://ask.sagemath.org/question/444... and the advice was to use a Sage version python2. Here is my version: La version du serveur de notebook est : 6.4.12 Le serveur utilise la version de Python : Python 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0]

Information du Noyau courant : SageMath version 9.5, Release Date: 2022-01-30
│ Using Python 3.11.2. Type "help()" for help.

======================

Here is a repeat of the error, this time using PIL File /usr/lib/python3/dist-packages/PIL/Image.py:1248, in Image._crop(self, im, box) 1236 def _crop(self, im, box): 1237 """ 1238 Returns a rectangular region from the core image object im. 1239 (...) 1245 :returns: A core image object. 1246 """ -> 1248 x0, y0, x1, y1 = map(int, map(round, box)) 1250 absolute_values = (abs(x1 - x0), abs(y1 - y0)) 1252 _decompression_bomb_check(absolute_values)

TypeError: type sage.rings.integer.Integer doesn't define __round__ method

In theory this should not be happening anymore. Question: Is there a fix for the current version?

Preview: (hide)

Comments

First install the latest version of sage, namely sage 10.6.

FrédéricC gravatar imageFrédéricC ( 0 years ago )
1

WorksForMe(TM) on (compiled from source) Sage 10.6 + (system) Python 3.13.2.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 0 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 10 hours ago

PatB gravatar image

updated 10 hours ago

Hi Fred and Emmanuel,

I'm using Debian 12 and I discovered that it installs 9.5 which has a pretty serious internal problem when using PIL :(

It's not clear how to install 10.6 to fix this problem for my arch

Have you any suggestions ?

thanks Pat

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 0 years ago

Seen: 39 times

Last updated: 10 hours ago