App does not work at all

Bug #1926292 reported by Vonschutter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autoinstall-generator
Fix Committed
High
Dan Bungert

Bug Description

14:10:25-tangarora@device:~$ autoinstall-generator -c ./preseed.cfg ./preseed.yml
Traceback (most recent call last):
  File "/snap/autoinstall-generator/64/usr/bin/autoinstall-generator", line 56, in <module>
    sys.exit(main())
  File "/snap/autoinstall-generator/64/usr/bin/autoinstall-generator", line 47, in main
    out = convert_file(infile, args)
  File "/snap/autoinstall-generator/64/lib/python3.6/site-packages/autoinstall_generator/merging.py", line 205, in convert_file
    for idx, line in enumerate(preseed_file.readlines()):
  File "/snap/autoinstall-generator/64/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 0xe2 in position 1678: ordinal not in range(128)
14:11:39-tangarora@device:~$ autoinstall-generator --help
usage: autoinstall-generator [-h] [-c] [-d] [-V] infile [outfile]

positional arguments:
  infile Debian install preseed file, or a dash to read stdin
  outfile Subiquity autoinstall yaml

optional arguments:
  -h, --help show this help message and exit
  -c, --cloud output in cloud-config format
  -d, --debug include commented out debug output explaining the conversions
                 performed
  -V, --version show version and exit
14:13:40-tangarora@device:~$
14:14:05-tangarora@device:~$ locale charmap
UTF-8
14:14:09-tangarora@device:~$

Tags: fr-1636
Revision history for this message
Vonschutter (stephan-schutter) wrote :
Revision history for this message
Vonschutter (stephan-schutter) wrote :
Dan Bungert (dbungert)
Changed in autoinstall-generator:
status: New → Confirmed
Revision history for this message
alex conte (aconte) wrote :

Hello,
 I have the same bug, does the solution given with the stackoverflow link work ?

Best regards.

Dan Bungert (dbungert)
Changed in autoinstall-generator:
importance: Undecided → High
assignee: nobody → Dan Bungert (dbungert)
tags: added: fr-1636
Revision history for this message
Dan Bungert (dbungert) wrote :

@stephan-shutter: thanks for the bug report, and the practical example of a more interesting preseed file. I've pushed a partial fix for your case - it addresses the unicode portion, but doesn't yet support multiline directives.

@aconte: If the only bug you've run into is the lack of correct unicode handling, then the new version on the edge channel may work for you. Consider running this to try it out:
snap refresh --edge autoinstall-generator

Revision history for this message
Dan Bungert (dbungert) wrote (last edit ):

Tracking multiline in LP: #1940856

Changed in autoinstall-generator:
status: Confirmed → Fix Committed
Revision history for this message
alex conte (aconte) wrote :

Hello I tried the command you send me and I got this message:

Traceback (most recent call last):
  File "/snap/autoinstall-generator/80/usr/bin/autoinstall-generator", line 56, in <module>
    sys.exit(main())
  File "/snap/autoinstall-generator/80/usr/bin/autoinstall-generator", line 47, in main
    out = convert_file(infile, args)
  File "/snap/autoinstall-generator/80/lib/python3.6/site-packages/autoinstall_generator/merging.py", line 206, in convert_file
    directives.append(convert(line.strip('\n'), idx + 1))
  File "/snap/autoinstall-generator/80/lib/python3.6/site-packages/autoinstall_generator/convert.py", line 280, in convert
    return dispatch(line, pkg, key, value, linenumber)
  File "/snap/autoinstall-generator/80/lib/python3.6/site-packages/autoinstall_generator/convert.py", line 251, in dispatch
    return debconf_fragment(value, line, linenumber)
  File "/snap/autoinstall-generator/80/lib/python3.6/site-packages/autoinstall_generator/convert.py", line 163, in debconf_fragment
    key = f'{chunks[0]} {chunks[1]}'
IndexError: list index out of range

Regards.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.