Hello, battray does not work with python 3 in 11.1-RELEASE: battray error: a bytes-like object is required, not 'str' File "/usr/local/lib/python3.6/site-packages/battray/__init__.py", line 135, in update_status self.data['lifetime']) = self.platform() File "/usr/local/lib/python3.6/site-packages/battray/platforms.py", line 38, in freebsd for line in o.split('\n'): The following patch solves this for me: --- battray/platforms.py.orig 2017-10-13 15:38:32.473043000 +0200 +++ battray/platforms.py 2017-10-13 15:38:55.984945000 +0200 @@ -35,7 +35,7 @@ o = subprocess.Popen(['acpiconf', '-i0'], stdout=subprocess.PIPE).communicate()[0] - for line in o.split('\n'): + for line in o.decode().split('\n'): if line.find(':') == -1: continue (key, value) = line.split(':', 1)
Hello, This bug is already fixed in the current master branch of the project about 7 months ago. I asked the upstream author to create a new release for this Freebsd port.
Hello, Martin kindly created a new release: https://github.com/Carpetsmoker/battray/releases/tag/version-2.3 It works great, please update this port.
Good news. I wrote the patch and it will run through my test-machines over night. If anything is fine i can commit tomorrow. :) Thanks!
A commit references this bug: Author: tz Date: Thu Nov 9 14:01:33 UTC 2017 New revision: 453808 URL: https://svnweb.freebsd.org/changeset/ports/453808 Log: sysutils/battray: Update from 2.1 to 2.3 Fixes this Python 3 issue on FreeBSD 11.1: battray error: a bytes-like object is required, not 'str' File "/usr/local/lib/python3.6/site-packages/battray/__init__.py", line 135, in update_status self.data['lifetime']) = self.platform() File "/usr/local/lib/python3.6/site-packages/battray/platforms.py", line 38, in freebsd for line in o.split('\n'): PR: 222980 Reported by: bsd@mkfs.nl MFH: 2017Q4 Changes: head/sysutils/battray/Makefile head/sysutils/battray/distinfo
A commit references this bug: Author: tz Date: Thu Nov 9 14:34:30 UTC 2017 New revision: 453818 URL: https://svnweb.freebsd.org/changeset/ports/453818 Log: MFH: r453808 sysutils/battray: Update from 2.1 to 2.3 Fixes this Python 3 issue on FreeBSD 11.1: battray error: a bytes-like object is required, not 'str' File "/usr/local/lib/python3.6/site-packages/battray/__init__.py", line 135, in update_status self.data['lifetime']) = self.platform() File "/usr/local/lib/python3.6/site-packages/battray/platforms.py", line 38, in freebsd for line in o.split('\n'): PR: 222980 Reported by: bsd@mkfs.nl Approved by: ports-secteam (swills) Changes: _U branches/2017Q4/ branches/2017Q4/sysutils/battray/Makefile branches/2017Q4/sysutils/battray/distinfo
Committed, thanks! :)