rliou92 / python-umonitor Goto Github PK
View Code? Open in Web Editor NEWManage monitor configuration automatically.
License: MIT License
Manage monitor configuration automatically.
License: MIT License
Because of this:
python-umonitor/umonitor/umonitor.py
Line 119 in 6175f3f
Can't load a profile when the process is already running, which is kind of annoying.
I had to delete my "laptop" profile (no external screens) because the thing kept turning off screens when I disconnected the HDMI cable, and I could not load it manually while I was debugging.
Is there a reason for this?
Hello,
Your program works very well, and I just wanted to thank you for your work.
Hello rliou92,
mlim@linux:~/python-umonitor$ umonitor
Traceback (most recent call last):
File "/usr/local/bin/umonitor", line 11, in
load_entry_point('umonitor==20181018', 'console_scripts', 'umonitor')()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 480, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2693, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2324, in load
return self.resolve()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2330, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/local/lib/python2.7/dist-packages/umonitor-20181018-py2.7-linux-x86_64.egg/umonitor/init.py", line 3, in
from umonitor.umonitor import Umonitor
ImportError: No module named umonitor
I just encountered this exception on a fresh install of python-umonitor. autorandr was previously installed. I have not saved any profiles yet and it prevents from doing so.
On Archcraft, installed using yay.
Edit: tried using python setup.py install
but no difference.
~$: umonitor --verbose
INFO:root:Connected to X11 server.
INFO:root:Output name b'DP-00\x7f'
INFO:root:Finished edid_to_string on output b'ACR0XV272U XV272'
INFO:root:Output name b'eDP-1-10\xf0u\xa2\xd5\xe9\x7f'
Traceback (most recent call last):
File "/usr/bin/umonitor", line 33, in <module>
sys.exit(load_entry_point('umonitor==20181018', 'console_scripts', 'umonitor')())
File "/usr/lib/python3.9/site-packages/umonitor/__init__.py", line 23, in main
umon.run()
File "/usr/lib/python3.9/site-packages/umonitor/umonitor.py", line 53, in run
self.view_current_status()
File "/usr/lib/python3.9/site-packages/umonitor/umonitor.py", line 195, in view_current_status
self.setup_info = self.get_setup_info()
File "umonitor/screen.pyx", line 417, in screen.Screen.get_setup_info
File "umonitor/screen.pyx", line 106, in screen.Screen._get_output_info
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf0 in position 8: invalid continuation byte
Output for umonitor daemonize in my case:
➜ autostart umonitor --listen --daemonize
Traceback (most recent call last):
File "/usr/local/bin/umonitor", line 33, in <module>
sys.exit(load_entry_point('umonitor==20181018', 'console_scripts', 'umonitor')())
File "/usr/local/lib/python3.10/dist-packages/umonitor-20181018-py3.10-linux-x86_64.egg/umonitor/__init__.py", line 23, in main
umon.run()
File "/usr/local/lib/python3.10/dist-packages/umonitor-20181018-py3.10-linux-x86_64.egg/umonitor/umonitor.py", line 47, in run
with daemon.DaemonContext() as my_daemon:
AttributeError: module 'daemon' has no attribute 'DaemonContext'
I installed this on Manjaro and the path to the config file was missing so the cli failed.
I had to mkdir -p ~/.config/umon/
Operating System: Manjaro Linux
Kernel: Linux 4.19.88-1-MANJARO
Architecture: x86-64
Upgraded Syu and started receiving errors; umonitor no longer runs.
This is
Name : python-umonitor-git
Version : r90.6175f3f-1
Build Date : Mon 01 Jul 2019 04:44:20 PM CDT
Install Date : Sat 23 Nov 2019 06:54:16 AM CST
and the error received for any execution (any arguments) is:
➜ ~ umonitor -a
Traceback (most recent call last):
File "/usr/bin/umonitor", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3251, in <module>
def _initialize_master_working_set():
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3263, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'umonitor==20181018' distribution was not found and is required by the application
I also tried the umonitor-git
package, which is:
Name : umonitor-git
Version : r180.0591487-1
AUR URL : https://aur.archlinux.org/packages/umonitor-git
First Submitted : Sat 27 May 2017 06:33:32 PM CDT
Last Modified : Thu 18 Oct 2018 10:27:42 PM CDT
but this version either complains about the config file:
➜ ~ umonitor --verbose --load .config/umon/umon.conf
Connected to server
Configuration file not found.
or segfaults:
➜ ~ umonitor -n --daemonize --verbose
[1] 2688712 segmentation fault (core dumped) umonitor -n --daemonize --verbose
At the time I'm posting this, AUR is down for maintenance, or I'd report the package; maybe some of the dependency libraries were missed. In any case, reporting here for for posterity.
Hey,
The PR I opened (#7) was merged, but now screen.c must be regenerated.
Shouldn't it just be created as part of the build process?
Hello, I just upgraded python to 3.11 and umonitor is not working anymore.
running install
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/lib/python3/dist-packages/setuptools/command/easy_install.py:146: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
writing umonitor.egg-info/PKG-INFO
writing dependency_links to umonitor.egg-info/dependency_links.txt
writing entry points to umonitor.egg-info/entry_points.txt
writing requirements to umonitor.egg-info/requires.txt
writing top-level names to umonitor.egg-info/top_level.txt
reading manifest file 'umonitor.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'umonitor.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building 'screen' extension
x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.11 -c umonitor/screen.c -o build/temp.linux-x86_64-cpython-311/umonitor/screen.o
umonitor/screen.c:215:12: fatal error: longintrepr.h: File o directory non esistente
215 | #include "longintrepr.h"
| ^~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.