nefelim4ag / Ananicy

Ananicy - is Another auto nice daemon, with community rules support (Use pull request please)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash: ValueError : name are reserved for future Enum use

raphielscape opened this issue · comments

Traceback (most recent call last):
File "/usr/bin/ananicy", line 20, in
class ProcSchedulerPolicy(Enum):
File "/usr/bin/ananicy", line 30, in ProcSchedulerPolicy
@classmethod
File "/usr/lib/python3.5/enum.py", line 61, in setitem
raise ValueError('names are reserved for future Enum use')
ValueError: names are reserved for future Enum use

I'm getting this error too.

$ uname -a
Linux crunchbang 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 GNU/Linux

I will take care of that. Seems like python3.5 doesn't support _missing_ function for enums.

commented

I recently had a random crash while PC is idle

May 19 06:25:12 xmg ananicy[599]: Traceback (most recent call last):
May 19 06:25:12 xmg ananicy[599]:   File "/usr/bin/ananicy", line 769, in <module>
May 19 06:25:12 xmg ananicy[599]:     main(sys.argv)
May 19 06:25:12 xmg ananicy[599]:   File "/usr/bin/ananicy", line 750, in main
May 19 06:25:12 xmg ananicy[599]:     daemon.run()
May 19 06:25:12 xmg ananicy[599]:   File "/usr/bin/ananicy", line 685, in run
May 19 06:25:12 xmg ananicy[599]:     self.proc_map_update()
May 19 06:25:12 xmg ananicy[599]:   File "/usr/bin/ananicy", line 529, in proc_map_update
May 19 06:25:12 xmg ananicy[599]:     for pid in self.proc_get_pids():
May 19 06:25:12 xmg ananicy[599]:   File "/usr/bin/ananicy", line 496, in proc_get_pids
May 19 06:25:12 xmg ananicy[599]:     if not os.path.realpath("/proc/{}/exe".format(pid)):
May 19 06:25:12 xmg ananicy[599]:   File "/usr/lib/python3.7/posixpath.py", line 395, in realpath
May 19 06:25:12 xmg ananicy[599]:     path, ok = _joinrealpath(filename[:0], filename, {})
May 19 06:25:12 xmg ananicy[599]:   File "/usr/lib/python3.7/posixpath.py", line 443, in _joinrealpath
May 19 06:25:12 xmg ananicy[599]:     path, ok = _joinrealpath(path, os.readlink(newpath), seen)
May 19 06:25:12 xmg ananicy[599]: ProcessLookupError: [Errno 3] No such process: '/proc/7890/exe'
May 19 06:25:12 xmg systemd[1]: ananicy.service: Main process exited, code=exited, status=1/FAILURE
May 19 06:25:12 xmg systemd[1]: ananicy.service: Failed with result 'exit-code'.
May 19 06:25:12 xmg systemd[1]: ananicy.service: Consumed 5min 6.977s CPU time.
May 19 06:25:13 xmg systemd[1]: ananicy.service: Service RestartSec=100ms expired, scheduling restart.
May 19 06:25:13 xmg systemd[1]: ananicy.service: Scheduled restart job, restart counter is at 1.
May 19 06:25:13 xmg systemd[1]: Stopped Ananicy - ANother Auto NICe daemon.
May 19 06:25:13 xmg systemd[1]: ananicy.service: Consumed 5min 6.977s CPU time.
May 19 06:25:13 xmg systemd[1]: Starting Ananicy - ANother Auto NICe daemon...

Reopen if needed