[Debian-med-packaging] Bug#935345: microbegps: Qt4 removal from Bullseye
Dmitry Shachnev
mitya57 at debian.org
Fri Sep 6 13:40:18 BST 2019
On Fri, Sep 06, 2019 at 02:30:25PM +0200, Andreas Tille wrote:
> Now I see at least a flash of a window before I get:
>
> $ MicrobeGPS
> libpng warning: iCCP: known incorrect sRGB profile
> libpng warning: iCCP: known incorrect sRGB profile
> libpng warning: iCCP: known incorrect sRGB profile
> Traceback (most recent call last):
> File "/usr/lib/python3/dist-packages/microbegps/gui.py", line 1571, in run
> nodes,ranks = taxonomy.parse_nodes_dmp(pkg_resources.resource_stream('microbegps','data/taxonomy/nodes.dmp'))
> File "/usr/lib/python3/dist-packages/microbegps/taxonomy.py", line 15, in parse_nodes_dmp
> fields = line.rstrip('\t|\n').split('\t|\t')
> TypeError: a bytes-like object is required, not 'str'
That is because resource_stream() returns stream in binary mode, not text:
https://setuptools.readthedocs.io/en/latest/pkg_resources.html#basic-resource-access
Try adding .decode('utf-8'):
fields = line.decode('utf-8').rstrip('\t|\n').split('\t|\t')
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "/usr/lib/python3/dist-packages/microbegps/gui.py", line 1573, in run
> self.failed.emit('<b><font color="DarkRed">Error loading NCBI taxonomy!</font></b><br>Message: <i>'+e.message+'</i>')
> AttributeError: 'TypeError' object has no attribute 'message'
Use str(e) instead of e.message.
--
Dmitry Shachnev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-med-packaging/attachments/20190906/4daa9687/attachment-0001.sig>
More information about the Debian-med-packaging
mailing list