[SOLVED] Cannot start cinnamon-settings

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Rigboat27
Level 1
Level 1
Posts: 6
Joined: Mon Dec 28, 2020 2:36 am

[SOLVED] Cannot start cinnamon-settings

Post by Rigboat27 »

As, the title states, cinnamon-settings suddenly refuses to start. Anything related to settings like sound, desktop bg's, bluetooth, themes etc etc also fail to open.
If i try to launch cinnamon-settings from the terminal, i get a python traceback:

Code: Select all

nighthawk@mintlord:~$ cinnamon-settings
Using pam module (python3-pampy)
Traceback (most recent call last):
  File "/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py", line 730, in <module>
    window = MainWindow()
  File "/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py", line 309, in __init__
    for module in modules:
  File "/usr/share/cinnamon/cinnamon-settings/modules/cs_user.py", line 10, in <module>
    import pexpect
  File "/home/nighthawk/.local/lib/python3.7/site-packages/pexpect/__init__.py", line 75, in <module>
    from .pty_spawn import spawn, spawnu
  File "/home/nighthawk/.local/lib/python3.7/site-packages/pexpect/pty_spawn.py", line 14, in <module>
    from .spawnbase import SpawnBase
  File "/home/nighthawk/.local/lib/python3.7/site-packages/pexpect/spawnbase.py", line 224
    def expect(self, pattern, timeout=-1, searchwindowsize=-1, async=False):
                                                                   ^
SyntaxError: invalid syntax
I know a little bit of python but I don't understand what has happened here. This issue occurs regardless of which python 2 or 3.

I'm running LMDE 4. I don't exactly know what triggered this issue, but it suddenly started occurring. I had updated and installed a bunch of packages and pip modules, I don't exactly remember the names of all of them. Any help regarding this issue will be greatly appreciated. I will provide any logs/output required if needed.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 5 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Kseanfitz_1
Level 3
Level 3
Posts: 133
Joined: Mon Jun 15, 2020 2:32 pm
Location: USA love it or leave it!

Re: Cannot start cinnamon-settings

Post by Kseanfitz_1 »

Rigboat27 wrote: Mon Dec 28, 2020 3:22 am I know a little bit of python but I don't understand what has happened here. This issue occurs regardless of which python 2 or 3.

I'm running LMDE 4. I don't exactly know what triggered this issue, but it suddenly started occurring. I had updated and installed a bunch of packages and pip modules, I don't exactly remember the names of all of them. Any help regarding this issue will be greatly appreciated. I will provide any logs/output required if needed.

Code: Select all

grep -i "install" /var/log/dpkg.log
May get you a list of what has been installed. The latest will be at the bottom.
If no one can give you a better fix you can uninstall by the half and half again method and if you create a text document of the output you will have a record of what you uninstall so the "good" ones can be reinstalled.
You may also want to set a restore point and do a reboot and see if you get any updates listed that have anything to do with what you installed or Python related updates suddenly.
Also it may be possible to get a list and *maybe* ordered? of the pip modules from inside of a Python console, Maybe a list cmd.
Synaptic Package Manager also has a "history" function.
Welcome to the Linux Mint forums!
"One, is glad to be of service."
Rigboat27
Level 1
Level 1
Posts: 6
Joined: Mon Dec 28, 2020 2:36 am

Re: Cannot start cinnamon-settings

Post by Rigboat27 »

[SOLUTION]


Thanks for the help, but I managed to already solve it with some help. The issue at hand here was with pexpect's version, Python3.7, and the program calling the script from the wrong path. It was also due to the fact that async is a reserved word, python 3.7 onwards. Deleting ~/.local/lib/python3.7/site-packages/pexpect fixed it. The program is actually supposed to pull from /usr/lib/python3/dist-packages/pexpect instead.
Kseanfitz_1
Level 3
Level 3
Posts: 133
Joined: Mon Jun 15, 2020 2:32 pm
Location: USA love it or leave it!

Re: Cannot start cinnamon-settings

Post by Kseanfitz_1 »

Rigboat27 wrote: Mon Dec 28, 2020 12:42 pm [SOLUTION]


Thanks for the help, but I managed to already solve it with some help. The issue at hand here was with pexpect's version, Python3.7, and the program calling the script from the wrong path. It was also due to the fact that async is a reserved word, python 3.7 onwards. Deleting ~/.local/lib/python3.7/site-packages/pexpect fixed it. The program is actually supposed to pull from /usr/lib/python3/dist-packages/pexpect instead.
SO, I take it that it was one of the modules? How did you find the offending module and figure out what was wrong with it. Was it one you installed or was it something else, like overwritten or updated?
Just asking, because the only way I could have found it is a kind of broad based process of elimination and can be very time consuming, but often effective.
Welcome to the Linux Mint forums!
"One, is glad to be of service."
Rigboat27
Level 1
Level 1
Posts: 6
Joined: Mon Dec 28, 2020 2:36 am

Re: Cannot start cinnamon-settings

Post by Rigboat27 »

Kseanfitz_1 wrote: Mon Dec 28, 2020 2:08 pm
Rigboat27 wrote: Mon Dec 28, 2020 12:42 pm [SOLUTION]


Thanks for the help, but I managed to already solve it with some help. The issue at hand here was with pexpect's version, Python3.7, and the program calling the script from the wrong path. It was also due to the fact that async is a reserved word, python 3.7 onwards. Deleting ~/.local/lib/python3.7/site-packages/pexpect fixed it. The program is actually supposed to pull from /usr/lib/python3/dist-packages/pexpect instead.
SO, I take it that it was one of the modules? How did you find the offending module and figure out what was wrong with it. Was it one you installed or was it something else, like overwritten or updated?
Just asking, because the only way I could have found it is a kind of broad based process of elimination and can be very time consuming, but often effective.
As evident from the traceback, pexpect is using 'async' as a function argument. I realised this with some help from the web. 'async' is reserved from Python 3.7 on wards. I also realised that 'pexpect' is supposed to be pulled from Python3 by default. Since the code was pulling the module 'pexpect' from Python 3.7 and not Python 3, this issue arose. I must have installed pexpect for python 3.7 at some point while updating pip modules(most likely the case), and so, the program sought the module from the updated one. After realising this, I deleted 'pexpect' from Python 3.7, as stated before, and it normally pulled pexpect from Python3 instead, and the settings now initialise and work without any errors. Due to Python's clear statements during the traceback, this was possible. I was just dumb enough to not realise that async is reserved from Python 3.7 on wards.
Locked

Return to “Software & Applications”