-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After chaning to python3.11 getting a import error #752
Comments
Removed unused imports in: * terminator * terminatorlib/plugins/dir_open.py * terminatorlib/terminal.py * terminatorlib/terminal_popup_menu.py * terminatorlib/terminator.py * tests/test_signalman.py
Hello, @ayoubbenext. I couldn't reproduce the error having the same environment:
Terminator was installed from source via pip. However, according to the screenshot you've attached, Terminator fails at 24 line in entry (main) module, when trying to import Meanwhile, I've uploaded PR with removing that import and some else unused import statements which have been present in Terminator's sources. I would suggest you to test, if this works out:
Alternatively you can use Github CLI:
If it's fails with something else, please let me know. I'd also advise you to run python's REPL and try to import psutil:
|
Thanks for you're reply, getting the followin error when installing the pull request: × Preparing metadata (pyproject.toml) did not run successfully.
note: This error originates from a subprocess, and is likely not a problem with pip. × Encountered error while generating package metadata. note: This is an issue with the package mentioned above, not pip. |
psutil is still used in the cwd code for determining the cwd of the Terminator process. According to my reading of the code, your PR will fail as soon as terminator tries to open a terminal |
On a more general note, trying to "fix" terminator to work around bugs in other libraries and programs is a recipe for a lot of work for no return. |
So what's the solution? Still got: |
I'm not sure. Python 3.11 and psutil works fine for me
Maybe try making sure that you''re running and using the system installed version of psutil. If you are, then try uninstalling it and reinstalling it? |
Removed unused imports in: * terminator * terminatorlib/plugins/dir_open.py * terminatorlib/terminal.py * terminatorlib/terminal_popup_menu.py * terminatorlib/terminator.py * tests/test_signalman.py
fix: Remove unused imports in several modules #752
$HOME/.config/terminator/config
[global_config]
suppress_multiple_term_dialog = True
[keybindings]
[profiles]
[[default]]
[layouts]
[[default]]
[[[window0]]]
type = Window
parent = ""
[[[child1]]]
type = Terminal
parent = window0
[plugins]
Describe the bug
Getting a python import error.
Traceback (most recent call last):
File "/usr/bin/terminator", line 24, in
import psutil
File "/usr/lib/python3/dist-packages/psutil/init.py", line 102, in
from . import _pslinux as _psplatform
File "/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 26, in
from . import _psutil_linux as cext
ImportError: cannot import name '_psutil_linux' from partially initialized module 'psutil' (most likely due to a circular import) (/usr/lib/python3/dist-packages/psutil/init.py)
To Reproduce
Install python3.11.3
Expected behavior
Opening a terminator shell
Screenshots
Desktop (please complete the following information):
Additional context
After changing to python3.11 this error occured.
The text was updated successfully, but these errors were encountered: