1

When I start runsnake with

$ runsnake test.profile

the window opens, but with no graphics and no source code (only the list of calls, etc. is present). On the console, I see the following error message:

11:18:17: Debug: Adding duplicate image handler for 'PNG file'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/wx/core.py", line 3282, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
  File "/usr/lib/python3/dist-packages/runsnakerun/runsnake.py", line 701, in load
    self.SetModel(self.loader)
  File "/usr/lib/python3/dist-packages/runsnakerun/runsnake.py", line 738, in SetModel
    self.squareMap.SetModel(tree, self.adapter)
  File "/usr/lib/python3/dist-packages/squaremap/squaremap.py", line 221, in SetModel
    self.UpdateDrawing()
  File "/usr/lib/python3/dist-packages/squaremap/squaremap.py", line 247, in UpdateDrawing
    self.Draw(dc)
  File "/usr/lib/python3/dist-packages/squaremap/squaremap.py", line 257, in Draw
    font = self.FontForLabels(dc)
  File "/usr/lib/python3/dist-packages/squaremap/squaremap.py", line 267, in FontForLabels
    font.SetPointSize(scale * font.GetPointSize())
TypeError: Font.SetPointSize(): argument 1 has unexpected type 'float'

I installed runsnake using

sudo apt-get install runsnake

The versions of the dependencies are, according to pip list:

RunSnakeRun            2.0.5
SquareMap              1.0.5
wxPython               4.0.7

My system is

PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"

1 Answers1

0

A quick hack is to change the code that you run by modifying the code:

$ sudo $EDITOR /usr/lib/python3/dist-packages/squaremap/squaremap.py

Go to line 267

Then replace the line with:

font.SetPointSize(int(scale * font.GetPointSize()))

or hardcode someting:

font.SetPointSize(18)
amirouche
  • 7,682
  • 6
  • 40
  • 94
  • Many thanks for that! It does not quite work yet: I now see a single coloured rectangle (instead of the hierarchy of rectangles) and errors such as `Traceback (most recent call last): ... File "/usr/lib/python3/dist-packages/squaremap/squaremap.py", line 380, in DrawIconAndLabel dc.SetClippingRegion(x + 1, y + 1, w - 2, h - 2) # Don't draw outside the box TypeError: DC.SetClippingRegion(): arguments did not match any overloaded call: overload 1: argument 4 has unexpected type 'float' overload 2: argument 1 has unexpected type 'int' overload 3: argument 1 has unexpected type 'int'` – Martin Rubey Oct 12 '22 at 08:39