[Bug 1518150] Re: A Chinese character in the snapcraft.yaml crashes the snapcraft

Bug Watch Updater 1518150 at bugs.launchpad.net
Wed Dec 2 23:58:28 UTC 2015


** Changed in: pyyaml (Debian)
       Status: Unknown => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to pyyaml in Ubuntu.
https://bugs.launchpad.net/bugs/1518150

Title:
  A Chinese character in the snapcraft.yaml crashes the snapcraft

Status in Snapcraft:
  Fix Released
Status in pyyaml package in Ubuntu:
  In Progress
Status in pyyaml package in Debian:
  Fix Released

Bug description:
  In my snapcraft.yaml's summay, it contains an unrecoginized unicode
  space (between Piglow and API). When I try to use snapcraft to compile
  my project, it crashes:

  name: piglow2
  version: 1.0
  vendor: XiaoGuo, Liu <xiaoguo.liu at canonical.com>
  summary: Piglow API
  description: This is the webserver API to control the piglow
  icon: icon.png

  services:
    piglow2:
      start: bin/piglow2

  parts:
    piglow:
      plugin: go
      source: ./src/piglow2

  The output is like:

  ubuntu at a5ceb8ea0825:~/work/piglow2$ snapcraft
  Traceback (most recent call last):
    File "/usr/local/bin/snapcraft", line 4, in <module>
      __import__('pkg_resources').run_script('snapcraft==0.5', 'snapcraft')
    File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 735, in run_script
      self.require(requires)[0].run_script(script_name, ns)
    File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1652, in run_script
      exec(code, namespace, namespace)
    File "/usr/local/lib/python3.4/dist-packages/snapcraft-0.5-py3.4.egg/EGG-INFO/scripts/snapcraft", line 33, in <module>
      snapcraft.main.main()
    File "/usr/local/lib/python3.4/dist-packages/snapcraft-0.5-py3.4.egg/snapcraft/main.py", line 149, in main
      args.func(args)
    File "/usr/local/lib/python3.4/dist-packages/snapcraft-0.5-py3.4.egg/snapcraft/cmds.py", line 103, in assemble
      snap(args)
    File "/usr/local/lib/python3.4/dist-packages/snapcraft-0.5-py3.4.egg/snapcraft/cmds.py", line 85, in snap
      cmd(args)
    File "/usr/local/lib/python3.4/dist-packages/snapcraft-0.5-py3.4.egg/snapcraft/cmds.py", line 346, in cmd
      config = _load_config()
    File "/usr/local/lib/python3.4/dist-packages/snapcraft-0.5-py3.4.egg/snapcraft/cmds.py", line 412, in _load_config
      _config = snapcraft.yaml.Config()
    File "/usr/local/lib/python3.4/dist-packages/snapcraft-0.5-py3.4.egg/snapcraft/yaml.py", line 97, in __init__
      self.data = _snapcraft_yaml_load()
    File "/usr/local/lib/python3.4/dist-packages/snapcraft-0.5-py3.4.egg/snapcraft/yaml.py", line 312, in _snapcraft_yaml_load
      return yaml.load(fp)
    File "/usr/lib/python3/dist-packages/yaml/__init__.py", line 70, in load
      loader = Loader(stream)
    File "/usr/lib/python3/dist-packages/yaml/loader.py", line 34, in __init__
      Reader.__init__(self, stream)
    File "/usr/lib/python3/dist-packages/yaml/reader.py", line 85, in __init__
      self.determine_encoding()
    File "/usr/lib/python3/dist-packages/yaml/reader.py", line 124, in determine_encoding
      self.update_raw()
    File "/usr/lib/python3/dist-packages/yaml/reader.py", line 178, in update_raw
      data = self.stream.read(size)
    File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
      return codecs.ascii_decode(input, self.errors)[0]

  Attached please find the snapcraft.yaml, and my project is at:

  https://github.com/liu-xiao-guo/piglow2

To manage notifications about this bug go to:
https://bugs.launchpad.net/snapcraft/+bug/1518150/+subscriptions



More information about the foundations-bugs mailing list