You are not logged in.
Hi,
I'm trying to use powerline with my i3 and lemonbar.
When I run
python /usr/share/powerline/bindings/lemonbar/powerline-lemonbar.py –i3 1 ↵ 8894 18:09:24I get the following error
2018-12-30 18:09:33,330:ERROR:wm:WeatherSegment:Exception while computing state for None: the JSON object must be str, bytes or bytearray, not NoneType
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/powerline/lib/threaded.py", line 197, in render
update_state = queries[key][1]
KeyError: None
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/powerline/segments/common/wthr.py", line 115, in get_request_url
return self.location_urls[location_query]
KeyError: None
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/powerline/lib/threaded.py", line 220, in update_one
updates[key] = (monotonic(), self.compute_state(key))
File "/usr/lib/python3.7/site-packages/powerline/segments/common/wthr.py", line 139, in compute_state
url = self.get_request_url(location_query)
File "/usr/lib/python3.7/site-packages/powerline/segments/common/wthr.py", line 118, in get_request_url
location_data = json.loads(urllib_read('http://geoip.nekudo.com/api/'))
File "/usr/lib/python3.7/json/__init__.py", line 341, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not NoneType
2018-12-30 18:09:33,333:WARNING:wm:EmailIMAPSegment:Username and password are not configured
^CTraceback (most recent call last):
File "/usr/share/powerline/bindings/lemonbar/powerline-lemonbar.py", line 61, in <module>
time.sleep(1e8)These bindings are included in the official `powerline` package.
Can anyone confirm this issue?
Offline
When I run
python /usr/share/powerline/bindings/lemonbar/powerline-lemonbar.py –i3
Where does that powerline-lemonbar.py come from?
$ pacman -Fs powerline-lemonbar.py
community/python-powerline 2.7-2
usr/lib/python3.7/site-packages/powerline/bindings/lemonbar/powerline-lemonbar.py
community/python2-powerline 2.7-2
usr/lib/python2.7/site-packages/powerline/bindings/lemonbar/powerline-lemonbar.py"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
It comes from the python-powerline package
Offline
No, as shown in my post, it does not. What's the output of the following:
pacman -Qo /usr/share/powerline/bindings/lemonbar/powerline-lemonbar.pyLast edited by Trilby (2018-12-30 18:12:30)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Are you sure?
pacman -Qo /usr/share/powerline/bindings/lemonbar/powerline-lemonbar.py
/usr/lib/python3.7/site-packages/powerline/bindings/lemonbar/powerline-lemonbar.py is owned by python-powerline 2.7-2pacman -Ql python-powerline | grep bindings/lemonbar ✔ 8916 19:35:59
python-powerline /usr/lib/python3.7/site-packages/powerline/bindings/lemonbar/
python-powerline /usr/lib/python3.7/site-packages/powerline/bindings/lemonbar/__pycache__/
python-powerline /usr/lib/python3.7/site-packages/powerline/bindings/lemonbar/__pycache__/powerline-lemonbar.cpython-37.opt-1.pyc
python-powerline /usr/lib/python3.7/site-packages/powerline/bindings/lemonbar/__pycache__/powerline-lemonbar.cpython-37.pyc
python-powerline /usr/lib/python3.7/site-packages/powerline/bindings/lemonbar/powerline-lemonbar.pyOffline
Yes I'm sure. Read the command and output you just put there, those are different files. Clearly that command and/or output was fabricated/falsified.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Then I don't really understand the output to be honest.
There are two files, yes. (these files are actually identical as a diff shows)
But why is pacman -Qo pointing to the second file? Where is the information coming from?
EDIT:
Got it:
ll /usr/share/powerline/bindings ✔ 8976 20:33:20
lrwxrwxrwx 1 root root 51 12. Sep 12:08 /usr/share/powerline/bindings -> /usr/lib/python3.7/site-packages/powerline/bindingsOffline
So where did that symlink come from? That's not part of the package.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
It's coming from the dependency powerline.
tar -tvf /var/cache/pacman/pkg/powerline-2.7-2-x86_64.pkg.tar.xz ✔ 8981 20:43:33
-rw-r--r-- root/root 704 2018-09-12 12:08 .PKGINFO
-rw-r--r-- root/root 6143 2018-09-12 12:08 .BUILDINFO
-rw-r--r-- root/root 712 2018-09-12 12:08 .MTREE
drwxr-xr-x root/root 0 2018-09-12 12:08 usr/
drwxr-xr-x root/root 0 2018-09-12 12:08 usr/bin/
-rwxr-xr-x root/root 14208 2018-09-12 12:08 usr/bin/powerline
-rwxr-xr-x root/root 581 2018-09-12 12:08 usr/bin/powerline-config
-rwxr-xr-x root/root 12807 2018-09-12 12:08 usr/bin/powerline-daemon
-rwxr-xr-x root/root 342 2018-09-12 12:08 usr/bin/powerline-lint
-rwxr-xr-x root/root 885 2018-09-12 12:08 usr/bin/powerline-render
drwxr-xr-x root/root 0 2018-09-12 12:08 usr/share/
drwxr-xr-x root/root 0 2018-09-12 12:08 usr/share/powerline/
lrwxrwxrwx root/root 0 2018-09-12 12:08 usr/share/powerline/bindings -> /usr/lib/python3.7/site-packages/powerline/bindingspacman -Ql powerline ✔ 8982 20:43:52
powerline /usr/
powerline /usr/bin/
powerline /usr/bin/powerline
powerline /usr/bin/powerline-config
powerline /usr/bin/powerline-daemon
powerline /usr/bin/powerline-lint
powerline /usr/bin/powerline-render
powerline /usr/share/
powerline /usr/share/powerline/
powerline /usr/share/powerline/bindingsOffline
Ah - yes. That isn't actually a dependency which is why I didn't have it on my system. Sorry for the noise.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline