GSF1200S wrote:Still use this application all the time; thanks again for all the hard work!
I do have an issue, but I dont think its a bug on PkgBrowsers part- most likely a package I'm missing. Whenever I try to use the "log" tab for seeing package history, I get an unhandled exception error:
Traceback (most recent call last): File "/usr/lib/pkgbrowser/pkgbrowser/window.py", line 832, in handleInformationChanged self.updateInformation(index) File "/usr/lib/pkgbrowser/pkgbrowser/window.py", line 1076, in updateInformation self.format.information(package, widget.objectName())) File "/usr/lib/pkgbrowser/pkgbrowser/fmt.py", line 214, in information text = package[page] File "/usr/lib/pkgbrowser/pkgbrowser/backend.py", line 1266, in __getitem__ return self._log() File "/usr/lib/pkgbrowser/pkgbrowser/backend.py", line 1143, in _log return Cache.get_log(*names) File "/usr/lib/pkgbrowser/pkgbrowser/backend.py", line 155, in get_log cache = cls._caches[key] = conf.load_logfile(path) File "/usr/lib/pkgbrowser/pkgbrowser/conf.py", line 89, in load_logfile for line in stream: File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 6186: ordinal not in range(128)
I've tried installing the following packages: ascii, asciidoc, python-texttable, python-unidecode. Ive also checked the manual and see no mention of anything specifically needed to ensure proper operation of this feature. I've also rebuilt PkgBrowser.
Still get the same error. I've had this issue for months now, but I've just been doing a simple grep off cat /var/log/pacman.log in a term rather than deal with the problem No rush at all, but if you happen to know what I'm prolly missing let me know
Sorry for the late response: I haven't visited the forums recently.
I don't think this is a PkgBrowser problem. There must be something screwy with your Locale Settings.
By default, python3 opens files in text mode using an encoding which defaults to the user's preferences, and PkgBrowser never overrides those defaults when reading files. Somehow, your locale settings must have ASCII as the default text encoding (or possibly $LANG is either set to an invalid value or not set at all).
I can reproduce your error like this:
$ locale LANG=en_GB.UTF-8 LC_CTYPE="en_GB.UTF-8" LC_NUMERIC="en_GB.UTF-8" LC_TIME="en_GB.UTF-8" LC_COLLATE="en_GB.UTF-8" LC_MONETARY="en_GB.UTF-8" LC_MESSAGES="en_GB.UTF-8" LC_PAPER="en_GB.UTF-8" LC_NAME="en_GB.UTF-8" LC_ADDRESS="en_GB.UTF-8" LC_TELEPHONE="en_GB.UTF-8" LC_MEASUREMENT="en_GB.UTF-8" LC_IDENTIFICATION="en_GB.UTF-8" LC_ALL= $ LANG= python -c 'print(open("/var/log/pacman.log").read())' Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 163113: ordinal not in range(128)
I too apologize as I've been away from the forums awhile.
My locale settings were indeed all messed up- fixing them sees the log feature working fine again
]]>Still use this application all the time; thanks again for all the hard work!
I do have an issue, but I dont think its a bug on PkgBrowsers part- most likely a package I'm missing. Whenever I try to use the "log" tab for seeing package history, I get an unhandled exception error:
Traceback (most recent call last): File "/usr/lib/pkgbrowser/pkgbrowser/window.py", line 832, in handleInformationChanged self.updateInformation(index) File "/usr/lib/pkgbrowser/pkgbrowser/window.py", line 1076, in updateInformation self.format.information(package, widget.objectName())) File "/usr/lib/pkgbrowser/pkgbrowser/fmt.py", line 214, in information text = package[page] File "/usr/lib/pkgbrowser/pkgbrowser/backend.py", line 1266, in __getitem__ return self._log() File "/usr/lib/pkgbrowser/pkgbrowser/backend.py", line 1143, in _log return Cache.get_log(*names) File "/usr/lib/pkgbrowser/pkgbrowser/backend.py", line 155, in get_log cache = cls._caches[key] = conf.load_logfile(path) File "/usr/lib/pkgbrowser/pkgbrowser/conf.py", line 89, in load_logfile for line in stream: File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 6186: ordinal not in range(128)
I've tried installing the following packages: ascii, asciidoc, python-texttable, python-unidecode. Ive also checked the manual and see no mention of anything specifically needed to ensure proper operation of this feature. I've also rebuilt PkgBrowser.
Still get the same error. I've had this issue for months now, but I've just been doing a simple grep off cat /var/log/pacman.log in a term rather than deal with the problem No rush at all, but if you happen to know what I'm prolly missing let me know
Sorry for the late response: I haven't visited the forums recently.
I don't think this is a PkgBrowser problem. There must be something screwy with your Locale Settings.
By default, python3 opens files in text mode using an encoding which defaults to the user's preferences, and PkgBrowser never overrides those defaults when reading files. Somehow, your locale settings must have ASCII as the default text encoding (or possibly $LANG is either set to an invalid value or not set at all).
I can reproduce your error like this:
$ locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
$ LANG= python -c 'print(open("/var/log/pacman.log").read())'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 163113: ordinal not in range(128)
I do have an issue, but I dont think its a bug on PkgBrowsers part- most likely a package I'm missing. Whenever I try to use the "log" tab for seeing package history, I get an unhandled exception error:
Traceback (most recent call last):
File "/usr/lib/pkgbrowser/pkgbrowser/window.py", line 832, in handleInformationChanged
self.updateInformation(index)
File "/usr/lib/pkgbrowser/pkgbrowser/window.py", line 1076, in updateInformation
self.format.information(package, widget.objectName()))
File "/usr/lib/pkgbrowser/pkgbrowser/fmt.py", line 214, in information
text = package[page]
File "/usr/lib/pkgbrowser/pkgbrowser/backend.py", line 1266, in __getitem__
return self._log()
File "/usr/lib/pkgbrowser/pkgbrowser/backend.py", line 1143, in _log
return Cache.get_log(*names)
File "/usr/lib/pkgbrowser/pkgbrowser/backend.py", line 155, in get_log
cache = cls._caches[key] = conf.load_logfile(path)
File "/usr/lib/pkgbrowser/pkgbrowser/conf.py", line 89, in load_logfile
for line in stream:
File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 6186: ordinal not in range(128)
I've tried installing the following packages: ascii, asciidoc, python-texttable, python-unidecode. Ive also checked the manual and see no mention of anything specifically needed to ensure proper operation of this feature. I've also rebuilt PkgBrowser.
Still get the same error. I've had this issue for months now, but I've just been doing a simple grep off cat /var/log/pacman.log in a term rather than deal with the problem No rush at all, but if you happen to know what I'm prolly missing let me know
]]>]]>
please see the pkgbrowser manual and the changelog for further details.
]]>EDIT: I uploaded pkgbrowser-qt4 to the AUR for anyone who is also interested in using the older Qt4 version.
]]>Does anyone know a way to still get pkgbrowser-0.18.1 to compile with Qt4?
You probably won't be able to apply these two diffs directly, but they should show you what changes to make and where:
--- a/pkgbrowser/backend.py Mon Aug 10 01:14:00 2015 +0100
+++ b/pkgbrowser/backend.py Fri Oct 02 01:58:10 2015 +0100
@@ -3,7 +3,7 @@
import sys, os, re, glob, copy, errno, socket, json
import urllib.request, urllib.error, http.client
from zipfile import ZipFile, BadZipfile
-from html.parser import HTMLParser, HTMLParseError
+from html.parser import HTMLParser
from traceback import format_exception
from functools import cmp_to_key
from collections import defaultdict
@@ -286,7 +286,7 @@
self.reset()
try:
self.feed(data.decode('utf-8', 'replace'))
- except (HTMLParseError, AssertionError):
+ except AssertionError:
pass
return self._info
--- a/Makefile Fri Oct 02 01:58:10 2015 +0100
+++ b/Makefile Fri Oct 02 02:00:39 2015 +0100
@@ -44,16 +44,15 @@
compile:
$(PYTHON) -m compileall -ql $(APPNAME) $(APPNAME)/ui
- $(PYTHON) -O -m compileall -ql $(APPNAME) $(APPNAME)/ui
install:
install -m 755 -d $(BINDIR) $(APPLIB)/{,ui/}__pycache__
install -m 755 -d $(DESKTOPDIR) $(ICONDIR)
install -m 644 main.py $(APPDIR)
install -m 644 $(APPNAME)/*.{py,so} $(APPLIB)
- install -m 644 $(APPNAME)/__pycache__/*.py{c,o} $(APPLIB)/__pycache__
+ install -m 644 $(APPNAME)/__pycache__/*.pyc $(APPLIB)/__pycache__
install -m 644 $(APPNAME)/ui/*.py $(APPLIB)/ui
- install -m 644 $(APPNAME)/ui/__pycache__/*.py{c,o} $(APPLIB)/ui/__pycache__
+ install -m 644 $(APPNAME)/ui/__pycache__/*.pyc $(APPLIB)/ui/__pycache__
install -m 644 $(APPNAME).desktop $(DESKTOPDIR)
install -m 644 icons/app.png $(ICONDIR)/$(APPNAME).png
install -m 755 $(APPNAME).sh $(BINDIR)/$(APPNAME)
Traceback (most recent call last):
File "/usr/lib/pkgbrowser/main.py", line 9, in <module>
sys.exit(app.run())
File "/usr/lib/pkgbrowser/pkgbrowser/app.py", line 114, in run
app.window().setup()
File "/usr/lib/pkgbrowser/pkgbrowser/app.py", line 58, in window
from pkgbrowser.window import Window
File "/usr/lib/pkgbrowser/pkgbrowser/window.py", line 16, in <module>
from pkgbrowser.backend import (
File "/usr/lib/pkgbrowser/pkgbrowser/backend.py", line 6, in <module>
from html.parser import HTMLParser, HTMLParseError
ImportError: cannot import name 'HTMLParseError'
I tried recompiling and get these errors:
install -m 644 pkgbrowser/__pycache__/*.py{c,o} /var/abs/local/pkgbrowser-0.18.1-1/pkg/pkgbrowser/usr/lib/pkgbrowser/pkgbrowser/__pycache__
install: cannot stat ‘pkgbrowser/__pycache__/*.pyo’: No such file or directory
Makefile:50: recipe for target 'install' failed
make: *** [install] Error 1
The __pycache__ directory contains no .pyo files at all. Does anyone know a way to still get pkgbrowser-0.18.1 to compile with Qt4?
]]>Would this possibly be something to consider for a feature add? Test if in a GTK env, if true, set the environment variable?
Glad that you found a solution. However, I would say it is not the job of individual programs to fix potential issues with the users' DE.
I don't use any of the DEs Qt5 currently supports either. I ended up writing a custom QPA plugin to get everything working the way I wanted. It's a pity that qt5ct/lxqt-config didn't work for you, because I think that's definitely the right kind of solution for this issue. Not the best solution, though. The best solution would be for Qt to fix their stupid, incomplete, undocumented configuration architecture so that it works properly in the first place (i.e. like it did in Qt4).
As a fan and user of pkgbrowser, thanks and nice job.
Thanks - glad you find it useful
]]>I guess GTK got pulled in with some apps? After testing, I put the following in /etc/environment:
QT_STYLE_OVERRIDE=GTK+
Would this possibly be something to consider for a feature add? Test if in a GTK env, if true, set the environment variable?
As a fan and user of pkgbrowser, thanks and nice job.
]]>The fonts are all nice and readable in all cases except for PkgBrowser, which is using very small fonts. I've repetdly tried setting the font size in a minimalistic way without success. Now out of flustration, I installed the entire KDE Plasma DE alongside ratpoison. It is possible to set the font size in KDE Plasma, but whatever config it sets up is not used by PkgBrowser when running in ratpoison.
In a different Arch system, I use Pkgbrowser in an Xfce DE and set the font size with qtconfig-qt4. This doesn't work running PkgBrowser in ratpoison.
It's probably because PkgBrowser uses PyQt5, and you aren't using a desktop that Qt5 recognises - or to be more precise, there is no built-in QPA plugin for your setup. There is also no official equivalent to qtconfig in Qt5, so you will have to look for a third-party solution. The only one I know of is qt5ct. I've never actually used it, but it does seem to be actively maintained.
]]>Not sure what system fonts are or how to set them.
For the console, I have manually placed ter-222b.psf.gz in /usr/share/kbd/consolefonts/ from the terminus-font package, and call it up from /etc/vconsole FONT=ter-222b. Didn't install the terminus font package due to incompatibility with bohoomil infinity bundle.
I'm running the Ratpoison WM with ttf-dejavu fonts and cairo-infinality-ultimate, fontconfig-infinality-ultimate, and freetype2-infinality-ultimate from the bohoomil infinity bundle repo. Infinity settings are INFINALITY_FT_BRIGHTNESS="-10" and INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"
I have "set font -*-monospace-*-*-*-*-20-*-*-*-*-*-*-*" in my .ratpoisonrc
The fonts are all nice and readable in all cases except for PkgBrowser, which is using very small fonts. I've repetdly tried setting the font size in a minimalistic way without success. Now out of flustration, I installed the entire KDE Plasma DE alongside ratpoison. It is possible to set the font size in KDE Plasma, but whatever config it sets up is not used by PkgBrowser when running in ratpoison.
In a different Arch system, I use Pkgbrowser in an Xfce DE and set the font size with qtconfig-qt4. This doesn't work running PkgBrowser in ratpoison.
]]>How to adjust PkgBrowser font size in a minimal Arch install?
PkgBrowser uses whatever the system font sizes are. The html in the information pane (bottom right) uses whatever is designated as "sans serif" and "monospace".
]]>