Closed innerave closed 3 years ago
Hi @innerave and thanks for reporting!
Did you install directly version 2.4 of ButterManager or did you upgrade from version 2.3?
I installed version 2.4 for the first time from aur
Ok.
Could you paste here the configuration file generated? It is located at ~/.buttermanager/buttermanager.yaml
Thanks! :)
I'm sorry, I just realized that the original error was different.
Traceback (most recent call last): File "/usr/bin/buttermanager", line 33, in <module> sys.exit(load_entry_point('buttermanager==2.3', 'console_scripts', 'buttermanager')()) File "/usr/lib/python3.9/site-packages/buttermanager/bm_main.py", line 17, in main PasswordWindow(None) File "/usr/lib/python3.9/site-packages/buttermanager/buttermanager/buttermanager.py", line 59, in __init__ self.__buttermanager_configurator = utils.ConfigManager() File "/usr/lib/python3.9/site-packages/buttermanager/buttermanager/util/utils.py", line 77, in __init__ self.__logger = Logger(self.__class__.__name__).get() File "/usr/lib/python3.9/site-packages/buttermanager/buttermanager/util/utils.py", line 229, in __init__ handler = logging.handlers.RotatingFileHandler(name, maxBytes=1048576, backupCount=5) File "/usr/lib/python3.9/logging/handlers.py", line 153, in __init__ BaseRotatingHandler.__init__(self, filename, mode, encoding=encoding, File "/usr/lib/python3.9/logging/handlers.py", line 58, in __init__ logging.FileHandler.__init__(self, filename, mode=mode, File "/usr/lib/python3.9/logging/__init__.py", line 1146, in __init__ StreamHandler.__init__(self, self._open()) File "/usr/lib/python3.9/logging/__init__.py", line 1175, in _open return open(self.baseFilename, self.mode, encoding=self.encoding, FileNotFoundError: [Errno 2] No such file or directory: '/home/alexander/.buttermanager/buttermanager.log'
After creating the directory .buttermanager
Traceback (most recent call last): File "/usr/bin/buttermanager", line 33, in <module> sys.exit(load_entry_point('buttermanager==2.3', 'console_scripts', 'buttermanager')()) File "/usr/lib/python3.9/site-packages/buttermanager/bm_main.py", line 17, in main PasswordWindow(None) File "/usr/lib/python3.9/site-packages/buttermanager/buttermanager/buttermanager.py", line 60, in __init__ self.__buttermanager_configurator.configure() File "/usr/lib/python3.9/site-packages/buttermanager/buttermanager/util/utils.py", line 142, in configure self.migrate_properties() File "/usr/lib/python3.9/site-packages/buttermanager/buttermanager/util/utils.py", line 186, in migrate_properties snapshots_to_keep = int(settings.properties_manager.get_property('snapshots_to_keep')) ValueError: invalid literal for int() with base 10: ''
❯ ls
logs buttermanager.log
2021-04-29 05:22:40,213 INFO:ConfigManager. Checking OS. ARCH found
2021-04-29 05:22:40,219 INFO:ConfigManager. Checking Desktop Environment. generic found
2021-04-29 05:22:40,219 INFO:ConfigManager. Installation type: native
2021-04-29 05:22:40,220 INFO:ConfigManager. Creating PropertiesManager...
2021-04-29 05:22:40,220 INFO:PropertiesManager. Warning: There is no configuration file...
And there is no buttermanager.yaml file.
So, did you have to create .buttermanager folder by hand?
This is very weird...
I will install a basic Arch Linux on a Virtual Machine with Gnome to test it and I'll give you my feedback. Thanks again! :)
Yes, the first error after a fresh installation is
[Errno 2] No such file or directory: '/home/alexander/.buttermanager/buttermanager.log'
When I create .buttermanager directory
ValueError: invalid literal for int() with base 10: ''
Ok, thank you very much. I'll install a virtual machine a take a look :)
Good news @innerave
I finally fixed this little but annoying bug and ButterManager 2.4.1 with this fix has been released in AUR. Could you test it and tell me if everything works fine now?
Thank you very much! :)
Now everything works perfectly! Thank you for your help!
Thanks to you for reporting this issue :)
I hope ButterManager is useful to you. I close the issue
I am getting the same error on buttermanager 2.4.2 on Fedora 37. It creates ~/.buttermanager/
, but it gives the following error:
QSocketNotifier: Can only be used with threads started with QThread
Traceback (most recent call last):
File "/usr/bin/buttermanager", line 33, in <module>
sys.exit(load_entry_point('buttermanager==2.4.2', 'console_scripts', 'buttermanager')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/buttermanager/bm_main.py", line 17, in main
PasswordWindow(None)
File "/usr/lib/python3.11/site-packages/buttermanager/buttermanager/buttermanager.py", line 60, in __init__
self.__buttermanager_configurator.configure()
File "/usr/lib/python3.11/site-packages/buttermanager/buttermanager/util/utils.py", line 140, in configure
self.migrate_properties()
File "/usr/lib/python3.11/site-packages/buttermanager/buttermanager/util/utils.py", line 184, in migrate_properties
snapshots_to_keep = int(settings.properties_manager.get_property('snapshots_to_keep'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
I did not see what it did on the first run, but if I delete ~/.buttermanager/
(which I assume is the same as running it for the first time), I get the following error once:
QSocketNotifier: Can only be used with threads started with QThread
Traceback (most recent call last):
File "/usr/bin/buttermanager", line 33, in <module>
sys.exit(load_entry_point('buttermanager==2.4.2', 'console_scripts', 'buttermanager')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/buttermanager/bm_main.py", line 17, in main
PasswordWindow(None)
File "/usr/lib/python3.11/site-packages/buttermanager/buttermanager/buttermanager.py", line 59, in __init__
self.__buttermanager_configurator = utils.ConfigManager()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/buttermanager/buttermanager/util/utils.py", line 92, in __init__
config_file_dictionary = yaml.load(config_file_as_dictionary)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: load() missing 1 required positional argument: 'Loader'
And then the first error on every subsequent run.
~/.buttermanager contains the following:
❯ ls -l ~/.buttermanager/
total 4
-rw-r--r--. 1 mpardalos mpardalos 393 Feb 16 09:36 buttermanager.log
drwxr-xr-x. 1 mpardalos mpardalos 0 Feb 16 09:36 logs/
The package from the fedora repos is version 2.4.2, but I also tried installing from github and it's the same exact behaviour.
Hi @mpardalos and thanks for the feedback.
I think this error was fixed on version 2.4.3 but you are right. The version which is in Fedora repo is 2.4.2. I contacted the maintainer of the package when this version was released and when version 2.5.0 was released too, but I think he is very busy at the moment to update it.
This is the issue which a user opened https://github.com/egara/buttermanager/issues/45 and I give you the fix I introduced. Maybe you can edit this file on your system and paste the new code. It should work: https://github.com/egara/buttermanager/commit/cf7cfa1718114b24821f9006f86dba69f378370a
But the real solution would be to upgrade the package to version 2.5.0 within Fedora repository.
I hope this helps, at least, at the moment.
Hi again @mpardalos
I have seen that a lot of users have reported this bug on Fedora directly https://bugzilla.redhat.com/show_bug.cgi?id=2074572
I've never worked with python, but it looks like there is something wrong with string to integer conversion. Arch Linux, Gnome 40.
Traceback (most recent call last): File "/usr/bin/buttermanager", line 33, in <module> sys.exit(load_entry_point('buttermanager==2.3', 'console_scripts', 'buttermanager')()) File "/usr/lib/python3.9/site-packages/buttermanager/bm_main.py", line 17, in main PasswordWindow(None) File "/usr/lib/python3.9/site-packages/buttermanager/buttermanager/buttermanager.py", line 60, in __init__ self.__buttermanager_configurator.configure() File "/usr/lib/python3.9/site-packages/buttermanager/buttermanager/util/utils.py", line 142, in configure self.migrate_properties() File "/usr/lib/python3.9/site-packages/buttermanager/buttermanager/util/utils.py", line 186, in migrate_properties snapshots_to_keep = int(settings.properties_manager.get_property('snapshots_to_keep')) ValueError: invalid literal for int() with base 10: ''