Hi dear Pythonists,

I’m having a problem with lib/scripts/convertDefault.py and Python 3, see below:

Traceback (most recent call last):
  File "/Users/stephan/git/lyx/lib/scripts/convertDefault.py", line 38, in 
<module>
    output = output.decode()
AttributeError: 'str' object has no attribute 'decode'

=====================
$ python
Python 3.6.6 (default, Jun 28 2018, 05:50:42) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, re, sys
>>> print (sys.version_info[0])
3
>>> fout = os.popen('magick -version 2>&1')
>>> output = fout.readline()
>>> print (output)
/bin/sh: magick: command not found

>>> output = output.decode()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'str' object has no attribute ‚decode'
=====================

Is this to be expected?

Stephan

Reply via email to