1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

yaml_parse(): end of stream reached without finding document 0

Discussion in 'Development' started by Enrico Angelon, May 2, 2018.

  1. Enrico Angelon

    Enrico Angelon Spider Jockey

    Messages:
    37
    GitHub:
    herryyt
    Hello everyone, today i have a problem with my minigame plugin, i'm not able to get rid of:
    [Server thread/CRITICAL]: Could not execute task castlesiege\Tasks\SignUpdaterTask: yaml_parse(): end of stream reached without finding document 0
    [19:59:01] [Server thread/CRITICAL]: ErrorException: "yaml_parse(): end of stream reached without finding document 0" (EXCEPTION) in "src/pocketmine/utils/Config" at line 155
    ====================================================================
    code was normally working, i don't have any idea why happend this.

    only part of cose where i use config:
    /*
    * Get game status.
    */
    $status = T::AQUA . "[Partecipa]";
    if ($config->get("started") != false)
    {
    $status = T::GOLD . "[In Gioco]";
    }elseif ($players_count >= 30)
    {
    $status = T::RED . "[Pieno]";
    }
     
  2. Michel5F30

    Michel5F30 Silverfish

    Messages:
    22
    This happens for me, when i try to read an empty YAML file.
    The PMMP YAML API obviously does NOT support empty YAML files.
    Use "pocketmine\utils\Config#save" when creating an empty config file, this will write strange characters into it, which doesn't affect you data and everything works fine.
    Output of "pocketmine\utils\Config#save" for an new file:
    Code:
    --- []
    ...
    
     
  3. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Copy config into http://yamllint.com and click "Go", copy output you get from yamllint.com, paste it into your config.
     
    LewBr likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.