Kozea / Kozea/pygal

can't multiply sequence by non-int of type 'float' when using label_font_size in custom style

Open
#527 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.8k
Forks
419
PR merge metrics
No merged PRs in 30d

Description

Applying this custom style:

```
custom_style = Style(
background='#fff',
label_font_size='16',
value_label_font_size='16')
```
causes an error:

`can't multiply sequence by non-int of type 'float'`

This seems to be caused by the `label_font_size` option, since removing it makes everything work again.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the custom Style example with string values for label_font_size and value_label_font_size, then trace how label_font_size is processed. Done means the example no longer raises the reported TypeError and a regression test covers these options.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.