From 32116608964af22b3143a1044bb152a2af853d64 Mon Sep 17 00:00:00 2001 From: vsl-iil <36484938+vsl-iil@users.noreply.github.com> Date: Sat, 26 Aug 2023 19:24:24 +0000 Subject: Fixed float(total_folders_text) ValueError Seems like Nicotine+ 3.2.9 added a non-breaking space to folders count. It caused an error when trying to convert string to float. --- __init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '__init__.py') diff --git a/__init__.py b/__init__.py index f864b75..1bf1b16 100644 --- a/__init__.py +++ b/__init__.py @@ -77,7 +77,7 @@ class Plugin(BasePlugin): try: total_size_text = self.frame.userbrowse.pages[user].share_size_label.get_text() total_folders_text_temp = self.frame.userbrowse.pages[user].num_folders_label.get_text() - total_folders_text = total_folders_text_temp.replace(",","") + total_folders_text = total_folders_text_temp.replace(",","").replace("\xa0", "") info_box_text = self.frame.userbrowse.pages[user].info_bar.label.get_text() progressbar_fraction = self.frame.userbrowse.pages[user].progress_bar.get_fraction() @@ -250,4 +250,4 @@ class Plugin(BasePlugin): self.probed[user] = 'processed' else: # We already dealt with this user. - pass \ No newline at end of file + pass -- cgit v1.2.3