Debian Bug report logs - #829115
diffoscope: …/comparators/ps.py: TypeError: cannot use a string pattern on a bytes-like object

version graph

Package: python3-magic; Maintainer for python3-magic is Christoph Biedl <debian.axhn@manchmal.in-ulm.de>; Source for python3-magic is src:python-magic (PTS, buildd, popcon).

Affects: diffoscope

Reported by: Axel Beckert <abe@debian.org>

Date: Thu, 30 Jun 2016 16:27:05 UTC

Severity: normal

Tags: confirmed, moreinfo

Merged with 828833

Found in version file/1:5.28-1

Fixed in version file/1:5.28-2

Done: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>

Bug is archived. No further changes may be made.

Forwarded to http://bugs.gw.com/view.php?id=562

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, abe@debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#829115; Package diffoscope. (Thu, 30 Jun 2016 16:27:09 GMT) (full text, mbox, link).


Acknowledgement sent to Axel Beckert <abe@debian.org>:
New Bug report received and forwarded. Copy sent to abe@debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Thu, 30 Jun 2016 16:27:09 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Axel Beckert <abe@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: diffoscope: …/comparators/ps.py: TypeError: cannot use a string pattern on a bytes-like object
Date: Thu, 30 Jun 2016 18:25:23 +0200
Package: diffoscope
Version: 54

Dear Maintainer,

running reprotest (It's there now, yay! :-) over my very recently
accepted package dpmb (from git commit
5f069a920df4e6f20a8eb9309c20c39ad60e6132) with

reprotest 'dpkg-buildpackage -b' ../debian-paketmanagement-buch_0\~2016.06.29_all.deb

caused diffoscope to bail out as follows:

dpkg-buildpackage: info: binary-only upload (no source included)
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/diffoscope/__main__.py", line 177, in main
    sys.exit(run_diffoscope(parsed_args))
  File "/usr/lib/python3/dist-packages/diffoscope/__main__.py", line 148, in run_diffoscope
    parsed_args.file1, parsed_args.file2)
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/__init__.py", line 94, in compare_root_paths
    file1 = specialize(FilesystemFile(path1, container=container1))
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/__init__.py", line 175, in specialize
    if cls.recognizes(file):
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/ps.py", line 38, in recognizes
    return PsFile.RE_FILE_TYPE.match(file.magic_file_type)
TypeError: cannot use a string pattern on a bytes-like object
reprotest 'dpkg-buildpackage -b'   388.71s user 3.51s system 0% cpu 15:39:40.01 total

I'm not sure how reprotest called diffoscope so I can't tell the exact
diffoscope commandline to reproduce this.

I'm also not 100% sure if I used reprotest in the correct way since
there is just its --help message, but no man page with examples yet.

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (600, 'testing'), (500, 'unstable-debug'), (500, 'buildd-unstable'), (110, 'experimental'), (1, 'experimental-debug'), (1, 'buildd-experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.6.0-trunk-amd64 (SMP w/8 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages diffoscope depends on:
ii  python3-libarchive-c   2.1-3
ii  python3-magic          1:5.28-2
ii  python3-pkg-resources  20.10.1-1.1
pn  python3:any            <none>

Versions of packages diffoscope recommends:
ii  acl                        2.2.52-3
ii  binutils-multiarch         2.26-12
ii  bzip2                      1.0.6-8
ii  caca-utils                 0.99.beta19-2+b1
ii  colord                     1:17
ii  cpio                       2.11+dfsg-5
pn  default-jdk | java-sdk     <none>
ii  enjarify                   1:1.0.2-1
ii  fontforge-extras           0.3-4
ii  fp-utils                   3.0.0+dfsg-6
ii  fp-utils-3.0.0 [fp-utils]  3.0.0+dfsg-6
ii  genisoimage                9:1.1.11-3
ii  gettext                    0.19.8.1-1
ii  ghc                        7.10.3-9
ii  ghostscript                9.19~dfsg-1+b1
ii  gnupg                      1.4.20-6
pn  mono-utils                 <none>
ii  pdftk                      2.02-4
ii  poppler-utils              0.44.0-3
ii  python3-debian             0.1.28
pn  python3-guestfs            <none>
pn  python3-rpm                <none>
ii  python3-tlsh               3.4.4+20151206-1+b1
pn  rpm2cpio                   <none>
ii  sng                        1.1.0-1+b1
ii  sqlite3                    3.13.0-1
ii  squashfs-tools             1:4.3-3
ii  unzip                      6.0-20
pn  vim-common                 <none>
ii  xz-utils                   5.1.1alpha+20120614-2.1

Versions of packages diffoscope suggests:
ii  libjs-jquery  1.12.4-1

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>:
Bug#829115; Package diffoscope. (Thu, 30 Jun 2016 16:33:06 GMT) (full text, mbox, link).


Acknowledgement sent to Mattia Rizzolo <mattia@debian.org>:
Extra info received and forwarded to list. Copy sent to Reproducible builds folks <reproducible-builds@lists.alioth.debian.org>. (Thu, 30 Jun 2016 16:33:06 GMT) (full text, mbox, link).


Message #10 received at 829115@bugs.debian.org (full text, mbox, reply):

From: Mattia Rizzolo <mattia@debian.org>
To: Axel Beckert <abe@debian.org>, 829115@bugs.debian.org
Subject: Re: [Reproducible-builds] Bug#829115: diffoscope: …/comparators/ps.py: TypeError: cannot use a string pattern on a bytes-like object
Date: Thu, 30 Jun 2016 16:30:26 +0000
[Message part 1 (text/plain, inline)]
control: reassign -1 python3-magic
control: forcemerge 828833 -1

On Thu, Jun 30, 2016 at 06:25:23PM +0200, Axel Beckert wrote:
> running reprotest (It's there now, yay! :-) over my very recently
> accepted package dpmb (from git commit
> 5f069a920df4e6f20a8eb9309c20c39ad60e6132) with
> 
> caused diffoscope to bail out as follows:
> 
> dpkg-buildpackage: info: binary-only upload (no source included)
> Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/diffoscope/__main__.py", line 177, in main
>     sys.exit(run_diffoscope(parsed_args))
>   File "/usr/lib/python3/dist-packages/diffoscope/__main__.py", line 148, in run_diffoscope
>     parsed_args.file1, parsed_args.file2)
>   File "/usr/lib/python3/dist-packages/diffoscope/comparators/__init__.py", line 94, in compare_root_paths
>     file1 = specialize(FilesystemFile(path1, container=container1))
>   File "/usr/lib/python3/dist-packages/diffoscope/comparators/__init__.py", line 175, in specialize
>     if cls.recognizes(file):
>   File "/usr/lib/python3/dist-packages/diffoscope/comparators/ps.py", line 38, in recognizes
>     return PsFile.RE_FILE_TYPE.match(file.magic_file_type)
> TypeError: cannot use a string pattern on a bytes-like object
> reprotest 'dpkg-buildpackage -b'   388.71s user 3.51s system 0% cpu 15:39:40.01 total
> 
> I'm not sure how reprotest called diffoscope so I can't tell the exact
> diffoscope commandline to reproduce this.
> 
> I'm also not 100% sure if I used reprotest in the correct way since
> there is just its --help message, but no man page with examples yet.

This bug is caused by a bug in src:file, which is now fixed.
though,

> Versions of packages diffoscope depends on:
> ii  python3-magic          1:5.28-2

this is the fixed version.
Are you sure you ran diffoscope with that version of python3-magic?

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-
[signature.asc (application/pgp-signature, inline)]

Bug reassigned from package 'diffoscope' to 'python3-magic'. Request was from Mattia Rizzolo <mattia@debian.org> to 829115-submit@bugs.debian.org. (Thu, 30 Jun 2016 16:33:06 GMT) (full text, mbox, link).


No longer marked as found in versions diffoscope/54. Request was from Mattia Rizzolo <mattia@debian.org> to 829115-submit@bugs.debian.org. (Thu, 30 Jun 2016 16:33:07 GMT) (full text, mbox, link).


Set Bug forwarded-to-address to 'http://bugs.gw.com/view.php?id=562'. Request was from Mattia Rizzolo <mattia@debian.org> to 829115-submit@bugs.debian.org. (Thu, 30 Jun 2016 16:33:08 GMT) (full text, mbox, link).


Marked Bug as done Request was from Mattia Rizzolo <mattia@debian.org> to 829115-submit@bugs.debian.org. (Thu, 30 Jun 2016 16:33:09 GMT) (full text, mbox, link).


Notification sent to Axel Beckert <abe@debian.org>:
Bug acknowledged by developer. (Thu, 30 Jun 2016 16:33:10 GMT) (full text, mbox, link).


Marked as fixed in versions file/1:5.28-2. Request was from Mattia Rizzolo <mattia@debian.org> to 829115-submit@bugs.debian.org. (Thu, 30 Jun 2016 16:33:10 GMT) (full text, mbox, link).


Marked as found in versions file/1:5.28-1. Request was from Mattia Rizzolo <mattia@debian.org> to 829115-submit@bugs.debian.org. (Thu, 30 Jun 2016 16:33:11 GMT) (full text, mbox, link).


Added tag(s) confirmed and moreinfo. Request was from Mattia Rizzolo <mattia@debian.org> to 829115-submit@bugs.debian.org. (Thu, 30 Jun 2016 16:33:12 GMT) (full text, mbox, link).


Merged 828833 829115 Request was from Mattia Rizzolo <mattia@debian.org> to 829115-submit@bugs.debian.org. (Thu, 30 Jun 2016 16:33:14 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Christoph Biedl <debian.axhn@manchmal.in-ulm.de>:
Bug#829115; Package python3-magic. (Thu, 30 Jun 2016 16:39:12 GMT) (full text, mbox, link).


Acknowledgement sent to Axel Beckert <abe@debian.org>:
Extra info received and forwarded to list. Copy sent to Christoph Biedl <debian.axhn@manchmal.in-ulm.de>. (Thu, 30 Jun 2016 16:39:12 GMT) (full text, mbox, link).


Message #33 received at 829115@bugs.debian.org (full text, mbox, reply):

From: Axel Beckert <abe@debian.org>
To: Mattia Rizzolo <mattia@debian.org>
Cc: 829115@bugs.debian.org
Subject: Re: [Reproducible-builds] Bug#829115: diffoscope: …/comparators/ps.py: TypeError: cannot use a string pattern on a bytes-like object
Date: Thu, 30 Jun 2016 18:37:29 +0200
Hi,

Mattia Rizzolo wrote:
> control: reassign -1 python3-magic
> control: forcemerge 828833 -1
> This bug is caused by a bug in src:file, which is now fixed.
> though,
> 
> > Versions of packages diffoscope depends on:
> > ii  python3-magic          1:5.28-2
> 
> this is the fixed version.
> Are you sure you ran diffoscope with that version of python3-magic?

Not sure anymore. I might be possible that the aptitude run wasn't
finished yet at that moment:

Preparing to unpack .../python3-magic_1%3a5.28-2_all.deb ...
Unpacking python3-magic (1:5.28-2) over (1:5.28-1) ...
Preparing to unpack .../python-magic_1%3a5.28-2_all.deb ...
Unpacking python-magic (1:5.28-2) over (1:5.28-1) ...
Preparing to unpack .../file_1%3a5.28-2_amd64.deb ...
Unpacking file (1:5.28-2) over (1:5.28-1) ...
Preparing to unpack .../libmagic1_1%3a5.28-2_amd64.deb ...
Unpacking libmagic1:amd64 (1:5.28-2) over (1:5.28-1) ...

But since I can't reproduce it anymore, so the packages probably have
been updated inbetween running reprotest and writing the bug report.
Sorry for the noise then. Due to #829113 reprotest was clearly started
before that package update, but I can't tell, if it ended before or
afterwards, as the popup was on another screen and I initially wasn't
sure where it came from, so clicked it away. Later I saw the traceback
from diffoscope.

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe@debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



Added indication that 829115 affects diffoscope Request was from Mattia Rizzolo <mattia@debian.org> to control@bugs.debian.org. (Thu, 30 Jun 2016 16:39:15 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Christoph Biedl <debian.axhn@manchmal.in-ulm.de>:
Bug#829115; Package python3-magic. (Thu, 30 Jun 2016 16:45:06 GMT) (full text, mbox, link).


Message #38 received at 829115@bugs.debian.org (full text, mbox, reply):

From: Mattia Rizzolo <mattia@debian.org>
To: Axel Beckert <abe@debian.org>
Cc: 829115@bugs.debian.org
Subject: Re: [Reproducible-builds] Bug#829115: diffoscope: …/comparators/ps.py: TypeError: cannot use a string pattern on a bytes-like object
Date: Thu, 30 Jun 2016 16:40:34 +0000
[Message part 1 (text/plain, inline)]
On Thu, Jun 30, 2016 at 06:37:29PM +0200, Axel Beckert wrote:
> But since I can't reproduce it anymore, so the packages probably have
> been updated inbetween running reprotest and writing the bug report.

I see.
Well, cool, I'm convinced this is due to that file's bug :)

Thanks for reporting bugs!!

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 29 Jul 2016 07:27:51 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed May 17 14:00:19 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.