# Read\_yaml incorrectly reads values startring with "E"?

**URL:** <https://swi-prolog.discourse.group/t/read-yaml-incorrectly-reads-values-startring-with-e/6892>\
**Category:** General\
**Created:** [October 17, 2023, 7:47am UTC](https://swi-prolog.discourse.group/t/read-yaml-incorrectly-reads-values-startring-with-e/6892 "2023-10-17T07:47:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexeyKosarchuk](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/alexeykosarchuk/32/4466_2.png) [@AlexeyKosarchuk](https://swi-prolog.discourse.group/u/AlexeyKosarchuk)\
**Post date:** [October 17, 2023, 7:47am UTC](https://swi-prolog.discourse.group/t/read-yaml-incorrectly-reads-values-startring-with-e/6892/1 "2023-10-17T07:47:24Z")

</div>

I have a yaml file with some of values that start with “E”.  
Simple example:

```prolog
key: "E5410"'
```

reading it produces following result:

```prolog
?- yaml_read("test.yaml", T).
T = yaml{key:_}.
```

Replacing “E” with any other letter fixes it.

Tried online yaml parser, it reads correctly.

Should I report a bug?

---

<div class="post-metadata">

**Author:** ![Boris](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/boris/32/7486_2.png) [@Boris](https://swi-prolog.discourse.group/u/Boris)\
**Post date:** [October 17, 2023, 8:03am UTC](https://swi-prolog.discourse.group/t/read-yaml-incorrectly-reads-values-startring-with-e/6892/2 "2023-10-17T08:03:05Z")

</div>

It doesn’t reproduce for me (MacOS installation from relocatable application bundle):

```prolog
$ cat test.yaml 
key: "E5410"
$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 9.1.17)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

?- yaml_read("test.yaml", T).
T = yaml{key:"E5410"}.

```

You should at least include the SWI-Prolog version and OS if you report a bug. You should also report if you have a non-default configuration.

The R solution to this (since there are endless ways to configure and botch your R environment) is the command-line option `--vanilla`:

```prolog
--vanilla
      Combine --no-save, --no-restore, --no-site-file, --no-init-file and --no-environ

```

I couldn’t find one single flag to do this in SWI-Prolog.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [October 17, 2023, 8:25am UTC](https://swi-prolog.discourse.group/t/read-yaml-incorrectly-reads-values-startring-with-e/6892/3 "2023-10-17T08:25:49Z")

</div>

> [@AlexeyKosarchuk](#):
>
> `T = yaml{key:_}.`

This is (AFAIK) an old bug. Get the 9.1.17 series. Not sure whether it is patched in 9.0.4.

> [@Boris](#):
>
> The R solution to this (since there are endless ways to configure and botch your R environment) is the command-line option `--vanilla`:

The `version 9.1.17` indicates a hash if it is not compiled from a tagged git version and `DIRTY` if some file is different from the git repo. To disable extensions, use

```
swipl -f none --no-packs ...

```

The first disables your `~/.config/swi-prolog/init.pl` (or the OS alternative) and the second does not attach your extension packs. This stuff was first of all added to prevent user extensions messing up building from source 🙂
