28
July
2026
Fixing the Cinnamon error "int() argument must be a string, a byte-like object or real number, not 'NoneType'"
17:38

Fixing the Cinnamon error "int() argument must be a string, a byte-like object or real number, not 'NoneType'"

28 July 2026 17:38

When loading a list of applets (small applications) into the system tray, the error "int() argument must be a string..." occurs.

Introduction

What is the Cinnamon desktop for?
In addition to being very beautiful, it is also functional. Cinnamon is the default desktop for Linux Mint, but it can be installed on Debian and other Linux operating systems. Its special feature is the ability to add mini-applications (downloaded from the Internet) to the system panel. On one of the machines I used the "Radio 3.0" application - an excellent Cinnamon utility for listening and recording Internet radio stations.

Installation of the Cinnamon desktop is done with the command:

sudo apt update
sudo apt install cinnamon

Then you need to log out and in the welcome window, before entering your username and password, change the desktop type in the list. For example, instead of the "Default" desktop, select Cinnamon.

Problem

On the taskbar, I right-clicked on the space next to the left of the System Tray.
applets

Then, to load a list of Cinnamon mini-applications, I select the bookmark with the mouse "Applets".
download

The list of applications is either not displayed or an error occurs when loading the list "int() argument must be a string, a byte-like object or real number, not 'NoneType'".
cinnamon_error

The reason is not the lack of Internet connection, but the careless writing of the program code Spices.py by Cinnamon programmers. Under some data transfer conditions, the content length may take on invalid values ​​that are not cast to int.

The following solution to the problem was found on the Linux Mint forum website - topic "Cinnamon 6.6.7: Applets Download fails after update (int() argument must be a string, not NoneType)".

Solution

The solution is shown in the figure. File

/usr/share/cinnamon/cinnamon-settings/bin/Spices.py

The erroneous line in Cinnamon 6.x is number 423 (in the old version of Cinnamon 5.2.7 - line 393), or search for "content-length".
cinnamon-spices

Correcting the text:
good_source

Was:

totalSize = int(response.headers.get('content-length'))

Became:

content_length=response.headers.get('content-length')
totalSize = int(content_length) if content_length is not None else -1

(Saving the file requires administrator rights, so Mousepad or another text editor must be launched with the command sudo.
Indent the text with spaces rather than tabs, because... this requires the Python programming language).

After which you need to end the operating system session and log in again.

Listing and loading of Cinnamon Applets now works.
good_spices_finish

P.S.

I recommend the Internet radio applet Radio3.0 from claudiux or simpler Radio++ by jonath92.
Both widgets have the ability to search for Internet radio stations and add them to your Favorites.
radio



Related publications