podhmo/dictknife

dictknife shape

Closed this issue · 2 comments

ReaderError: unacceptable character #x11066: special characters are not allowed

stack trace

Traceback (most recent call last):
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/reader.py", line 89, in peek
    return self.buffer[self.pointer+index]
IndexError: string index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "$HOME/venvs/my/bin/dictknife", line 12, in <module>
    sys.exit(main())
  File "$HOME/venvs/my/dictknife/dictknife/commands/dictknife.py", line 401, in main
    return params.pop("subcommand")(**params)
  File "$HOME/venvs/my/dictknife/dictknife/commands/dictknife.py", line 158, in shape
    d = loading.load(rf, format=input_format)
  File "$HOME/venvs/my/dictknife/dictknife/loading/__init__.py", line 40, in load
    return load(fp, loader=self, errors=errors)
  File "$HOME/venvs/my/dictknife/dictknife/loading/yaml.py", line 5, in load
    return m.yaml.load(fp, Loader=m.yaml.Loader, **kwargs)
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/__init__.py", line 72, in load
    return loader.get_single_data()
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/constructor.py", line 35, in get_single_data
    node = self.get_single_node()
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/composer.py", line 82, in compose_node
    node = self.compose_sequence_node(anchor)
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/composer.py", line 111, in compose_sequence_node
    node.value.append(self.compose_node(node, index))
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/composer.py", line 64, in compose_node
    if self.check_event(AliasEvent):
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/parser.py", line 572, in parse_flow_mapping_value
    if not self.check_token(FlowEntryToken, FlowMappingEndToken):
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/scanner.py", line 116, in check_token
    self.fetch_more_tokens()
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/scanner.py", line 248, in fetch_more_tokens
    return self.fetch_double()
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/scanner.py", line 652, in fetch_double
    self.fetch_flow_scalar(style='"')
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/scanner.py", line 663, in fetch_flow_scalar
    self.tokens.append(self.scan_flow_scalar(style))
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/scanner.py", line 1149, in scan_flow_scalar
    chunks.extend(self.scan_flow_scalar_non_spaces(double, start_mark))
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/scanner.py", line 1186, in scan_flow_scalar_non_spaces
    while self.peek(length) not in '\'\"\\\0 \t\r\n\x85\u2028\u2029':
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/reader.py", line 91, in peek
    self.update(index+1)
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/reader.py", line 169, in update
    self.check_printable(data)
  File "$HOME/venvs/my/lib/python3.7/site-packages/yaml/reader.py", line 144, in check_printable
    'unicode', "special characters are not allowed")
yaml.reader.ReaderError: unacceptable character #x11066: special characters are not allowed
  in "$HOME/Downloads/Archive 18-10-21 14-08-23.har", position 1477134

on yaml

-i json is worked