Bug#941885: mftrace fails in python3

2019-10-20 Thread Julian Gilbey
On Mon, Oct 07, 2019 at 10:40:27AM +0700, Igor Liferenko wrote:
> Package: mftrace
> Version: 1.2.20+git20190918.fd8fef5-1
> Severity: important
> 
> Dear Maintainer,
> 
> $ mftrace --formats=pfb --encoding=tex256.enc --magnification=2000 lhr10
> mftrace 1.2.20
> Font `lhr10'...
> Traceback (most recent call last):
> [...]
>   File "/usr/share/mftrace/tfm.py", line 38, in get_string
> s = (self.left[1:1 + b]).decode('ascii')
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc0 in position 0: 
> ordinal not in range(128)

Dear Igor,

Thanks for reporting this.  That is so bizarre.  I've explored the
lhr10.tfm file, and its encoding scheme is recorded as follows (in
octal/ASCII characters and hexadecimal):

000 300  \0  \0   & 300  \0  \0   " 300  \0  \0 032 300  \0  \0 030
 c0  00  00  26  c0  00  00  22  c0  00  00  1a  c0  00  00  18
020 300  \0  \0 037 300
 c0  00  00  1f  c0

I cannot fathom where this is coming from, but that is causing mftrace
to blow up at this point.  I'll investigate further

Best wishes,

   Julian



Bug#941885: mftrace fails in python3

2019-10-06 Thread Igor Liferenko
Package: mftrace
Version: 1.2.20+git20190918.fd8fef5-1
Severity: important

Dear Maintainer,

$ mftrace --formats=pfb --encoding=tex256.enc --magnification=2000 lhr10
mftrace 1.2.20
Font `lhr10'...
Traceback (most recent call last):
  File "/usr/bin/mftrace", line 1422, in 
main()
  File "/usr/bin/mftrace", line 1416, in main
do_file (filename)
  File "/usr/bin/mftrace", line 1365, in do_file
metric = tfm.read_tfm_file (options.tfm_file)
  File "/usr/share/mftrace/tfm.py", line 177, in read_tfm_file
reader =Tfm_reader (open (fn, 'rb').read ())
  File "/usr/share/mftrace/tfm.py", line 102, in __init__
self.coding = self.get_string ()
  File "/usr/share/mftrace/tfm.py", line 38, in get_string
s = (self.left[1:1 + b]).decode('ascii')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc0 in position 0: ordinal 
not in range(128)
Exception ignored in: 
Traceback (most recent call last):
  File "/usr/bin/mftrace", line 131, in __del__
  File "/usr/bin/mftrace", line 128, in clean
ImportError: sys.meta_path is None, Python is likely shutting down

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.2.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages mftrace depends on:
ii  fontforge1:20170731~dfsg-2
ii  libc62.29-2
ii  potrace  1.15-1+b1
ii  python3  3.7.3-1
ii  t1utils  1.41-3
ii  texlive-binaries [texlive-base-bin]  2019.20190605.51237-3

mftrace recommends no packages.

Versions of packages mftrace suggests:
ii  ghostscript  9.27~dfsg-3.1

-- no debconf information