On Tue, Dec 30, 2025 at 3:03 PM SOLES.G <[email protected]> wrote:
> Guau... :-)
>
> I don't understand why...
> but I also installed it from Flatpak... and it works!!! :-)
>
> Thanks... :-)
The problem is that PySolFC is not compatible with python 3.14. The
flatpak works because it includes an older version of python. Here is
one way to fix the issue:
--- PySolFC-3.4.1/pysollib/ui/tktile/tkcanvas.py.orig 2025-08-23
16:18:08.000000000 -0600
+++ PySolFC-3.4.1/pysollib/ui/tktile/tkcanvas.py 2025-12-30
15:18:07.851850394 -0700
@@ -29,6 +29,12 @@ from pysollib.ui.tktile.Canvas2 import I
from pysollib.ui.tktile.tkutil import loadImage, unbind_destroy
+def extract_integer(s):
+ for index, c in enumerate(s):
+ if not c.isdigit():
+ return int(s[:index])
+ return int(s)
+
# ************************************************************************
# * canvas items
# ************************************************************************
@@ -200,10 +206,10 @@ class MfxCanvas(tkinter.Canvas):
def _geometry(self):
w = self.winfo_width()
if w == 1:
- w = int(self.cget('width'))
+ w = extract_integer(self.cget('width'))
h = self.winfo_height()
if h == 1:
- h = int(self.cget('height'))
+ h = extract_integer(self.cget('height'))
scrollregion = self.cget('scrollregion')
if not scrollregion:
return w, h
@@ -285,8 +291,8 @@ class MfxCanvas(tkinter.Canvas):
dx, dy = 0, 0
else:
dx, dy = -self.xmargin, -self.ymargin
- x = event.x+dx+self.xview()[0]*int(self.cget('width'))
- y = event.y+dy+self.yview()[0]*int(self.cget('height'))
+ x = event.x+dx+self.xview()[0]*extract_integer(self.cget('width'))
+ y = event.y+dy+self.yview()[0]*extract_integer(self.cget('height'))
# x, y = event.x, event.y
for item in reversed(self.find_overlapping(x, y, x, y)):
for i, card in enumerate(stack.cards):
@@ -358,8 +364,8 @@ class MfxCanvas(tkinter.Canvas):
# ch = max(int(self.cget("height")), self.winfo_height())
ch = self.winfo_height()
# print iw, ih, cw, ch
- x = (cw-iw)//2-self.xmargin+self.xview()[0]*int(self.cget('width'))
- y = (ch-ih)//2-self.ymargin+self.yview()[0]*int(self.cget('height'))
+ x =
(cw-iw)//2-self.xmargin+self.xview()[0]*extract_integer(self.cget('width'))
+ y =
(ch-ih)//2-self.ymargin+self.yview()[0]*extract_integer(self.cget('height'))
id = self._x_create("image", x, y, image=image, anchor="nw")
self.tk.call(self._w, "raise", id)
self.__tops.append(id)
If you want to see the RPM version fixed, I recommend filing a bug
against the PySolFC package.
--
Jerry James
http://www.jamezone.org/
--
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue