Open mskrzetuski opened 7 years ago
Arguments to the segment are invalid:
shutdown_event
argument must not be supplied. Dunno how it appeared in documentation at all, but even if you wanted to set it to None
you should’ve used null
.update_first
set to true is default, no need to specify it. And it should be boolean, not string. true
is boolean, "true"
is string.format
argument you supplied looks like default… but it is not. Default is "{0:.0}%"
, not "u'{0:.0f}%'"
. u'…'
is Python unicode string and here is JSON with different quoting style.interval
1 is default, no need to specify it. Though this should not cause any harm.Errors are mostly harmless, except for shutdown_event
setting. It looks like you don’t need to supply args
dictionary at all.
Ah, and don’t use backtick for multiline code snippets. Use three backticks to start and end the snippet, each on its own line. E.g.
```JSON
"segments": {
…
}
```
which results in
"segments": {
…
}
(JSON
after backticks is optional code language, used for highlighting.)
Ran into the same issue today and after looking at the code I realized that the real issue behind it is that I didn't have psutil
properly installed. So the fix is
pip install psutil
Would have been nice to get a more informative error message :)
UPDATE:
After a second look, it looks like there was a good intention to have a proper warning, but the fallback CPULoadPercentSegment
class seems to be missing it's update
function:
https://github.com/powerline/powerline/blob/develop/powerline/segments/common/sys.py#L101
I'm getting following error message.
2017-01-05 14:52:45,265:ERROR:shell:CPULoadPercentSegment:Exception while updating: 'CPULoadPercentSegment' object has no attribute 'update' Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/powerline/lib/threaded.py", line 71, in set_update_value self.update_value = self.update(self.update_value) AttributeError: 'CPULoadPercentSegment' object has no attribute 'update'
My configuration looks as follows.