yaml / pyyaml

Canonical source repository for PyYAML
MIT License
2.57k stars 517 forks source link

Inclusion of LaTex math symbol. #699

Closed RubelMozumder closed 1 year ago

RubelMozumder commented 1 year ago

698 I have created this issue and i tried to find a solution as I need it argently.

@perlpunk Here, I tried to propose a solution to resolve the problem. python: 3.8 Name: PyYAML, Version: 6.0 compilation errors come from: "wavelength (:math:\lambda) of radiation incident on the sample" with errors:

    self.current_event = self.state()
  File "/home/rubel/Nomad-FAIRmat/NomadGH/GH_Clone/nomad-parser-nexus/.pyenv/lib/python3.7/site-packages/yaml/parser.py", line 449, in parse_block_mapping_value
    if not self.check_token(KeyToken, ValueToken, BlockEndToken):
  File "/home/rubel/Nomad-FAIRmat/NomadGH/GH_Clone/nomad-parser-nexus/.pyenv/lib/python3.7/site-packages/yaml/scanner.py", line 118, in check_token
    self.fetch_more_tokens()
  File "/home/rubel/Nomad-FAIRmat/NomadGH/GH_Clone/nomad-parser-nexus/.pyenv/lib/python3.7/site-packages/yaml/scanner.py", line 253, in fetch_more_tokens
    return self.fetch_double()
  File "/home/rubel/Nomad-FAIRmat/NomadGH/GH_Clone/nomad-parser-nexus/.pyenv/lib/python3.7/site-packages/yaml/scanner.py", line 657, in fetch_double
    self.fetch_flow_scalar(style='"')
  File "/home/rubel/Nomad-FAIRmat/NomadGH/GH_Clone/nomad-parser-nexus/.pyenv/lib/python3.7/site-packages/yaml/scanner.py", line 668, in fetch_flow_scalar
    self.tokens.append(self.scan_flow_scalar(style))
  File "/home/rubel/Nomad-FAIRmat/NomadGH/GH_Clone/nomad-parser-nexus/.pyenv/lib/python3.7/site-packages/yaml/scanner.py", line 1154, in scan_flow_scalar
    chunks.extend(self.scan_flow_scalar_non_spaces(double, start_mark))
  File "/home/rubel/Nomad-FAIRmat/NomadGH/GH_Clone/nomad-parser-nexus/.pyenv/lib/python3.7/site-packages/yaml/scanner.py", line 1248, in scan_flow_scalar_non_spaces
    "found unknown escape character %r" % ch, self.get_mark())
yaml.scanner.ScannerError: while scanning a double-quoted scalar
  in "NXsas_parsed.yml", line 41, column 16
found unknown escape character 'l'
  in "NXsas_parsed.yml", line 41, column 41
perlpunk commented 1 year ago

Closing, see explanation in https://github.com/yaml/pyyaml/issues/698#issuecomment-1426872135