First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 0 years ago

PatB gravatar image

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

This error was reported 6 years ago, https://ask.sagemath.org/question/44470/typeerror-with-graphsrandomgnp/

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 is again 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

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

This error was reported 6 years ago, https://ask.sagemath.org/question/44470/typeerror-with-graphsrandomgnp/

https://ask.sagemath.org/question/44470/typeerror-with-graphsrandomgnp/ 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 is again 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 ?

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

strong textThis error was reported 6 years ago, https://ask.sagemath.org/question/44470/typeerror-with-graphsrandomgnp/ 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)) 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?