Произошла ошибка при обработке списка метаданных yaml cpp

#1

Posted 12 June 2017 — 01:34 am

KastSkyrim

    Newbie

  • Members
  • Pip
  • 10 posts

LOOT has been giving me an error message that I have never seen before.  It’s a red box that says the metadata has been lost.  If I then run LOOT once or twice the message goes away, but in the process it also deletes all of the metadata that I have put in on my own which means that I have to go back each time to re-add those things.  Does anyone know what is causing this?  

(Not sure if this matters but I am running it through MO)

  • Back to top

#2



KastSkyrim

Posted 12 June 2017 — 07:50 am

KastSkyrim

    Newbie

  • Members
  • Pip
  • 10 posts

It happened again and this time I was able to CnP the error message.

«An error occurred while parsing the metadata list(s): yaml-cpp: error at line 201, column 13: bad conversion: ‘text’ key missing from ‘message content’ object.

Try updating your masterlist to resolve the error. If the error is with your user metadata, this probably happened because an update to LOOT changed its metadata syntax support. Your user metadata will have to be updated manually.

To do so, use the ‘Open Debug Log Location’ in LOOT’s main menu to open its data folder, then open your ‘userlist.yaml’ file in the relevant game folder. You can then edit the metadata it contains with reference to the documentation, which is accessible through LOOT’s main menu.

You can also seek support on LOOT’s forum thread, which is linked to on LOOT’s website

I went to the website but there isn’t much information there for checking.  Does anyone know what is causing this?  

  • Back to top

#3



ymf331

Posted 12 June 2017 — 09:19 am

it looks like you had added user metadata before loot updated for sse. it says in the first line what’s missing from your ‘userlist.yaml’ file and where. if you can paste the contents here i can probably help you pinpoint your problem.

  • Back to top

#4



metaforce

Posted 12 June 2017 — 10:47 am

I’m probably going to be the devils advocate here, but…….I would advise against sorting your loadorder with LOOT anyway. The longer your loadorder the worse the job LOOT does will become. Sort them by hand. Its a chunk of work but the results are far better than the mess LOOT creates sometimes. (I’ve seen quite a number of mods being put after merged patches and bashed patches….that is a complete nono) LOOT is still useful to populate your mods with delev, relev, location and other keywords so that Wrye Bash can do its magic for leveled lists and such. However the longer your loadorder gets the worse LOOT’s job will eventually become.

  • Back to top

#5



younglionsp88

Posted 18 September 2017 — 03:20 am

younglionsp88

    Stranger

  • Members
  • Pip
  • 1 posts

It happened again and this time I was able to CnP the error message.

«An error occurred while parsing the metadata list(s): yaml-cpp: error at line 201, column 13: bad conversion: ‘text’ key missing from ‘message content’ object.

Try updating your masterlist to resolve the error. If the error is with your user metadata, this probably happened because an update to LOOT changed its metadata syntax support. Your user metadata will have to be updated manually.

To do so, use the ‘Open Debug Log Location’ in LOOT’s main menu to open its data folder, then open your ‘userlist.yaml’ file in the relevant game folder. You can then edit the metadata it contains with reference to the documentation, which is accessible through LOOT’s main menu.

You can also seek support on LOOT’s forum thread, which is linked to on LOOT’s website

I went to the website but there isn’t much information there for checking.  Does anyone know what is causing this?  

I got the same error, but I fixed it by just sorting with in the LOOT app.

1. Open MO

2. Select the LOOT application  from the drop down menu (top right side of the screen)

3. Left click on run

4.  Once LOOT opens click on sort plugins (3 lines on the top right)

5. Let it run and apply if needed. (I did not need to apply)

6. Re-open LOOT the error message should be gone or at least it was for me.

Hope this helps 

Edited by younglionsp88, 18 September 2017 — 03:21 am.

  • Back to top

#6



loen999

Posted 10 November 2017 — 04:25 pm

It happened again and this time I was able to CnP the error message.

«An error occurred while parsing the metadata list(s): yaml-cpp: error at line 201, column 13: bad conversion: ‘text’ key missing from ‘message content’ object.

Try updating your masterlist to resolve the error. If the error is with your user metadata, this probably happened because an update to LOOT changed its metadata syntax support. Your user metadata will have to be updated manually.

To do so, use the ‘Open Debug Log Location’ in LOOT’s main menu to open its data folder, then open your ‘userlist.yaml’ file in the relevant game folder. You can then edit the metadata it contains with reference to the documentation, which is accessible through LOOT’s main menu.

You can also seek support on LOOT’s forum thread, which is linked to on LOOT’s website

I went to the website but there isn’t much information there for checking.  Does anyone know what is causing this?  

I got the same error, but I fixed it by just sorting with in the LOOT app.

1. Open MO

2. Select the LOOT application  from the drop down menu (top right side of the screen)

3. Left click on run

4.  Once LOOT opens click on sort plugins (3 lines on the top right)

5. Let it run and apply if needed. (I did not need to apply)

6. Re-open LOOT the error message should be gone or at least it was for me.

Hope this helps 

i am sure the point is his personal metadata missing, not how to simply clear it error out.

  • Back to top

#7



RazielAtazoth

Posted 27 March 2021 — 09:35 am

RazielAtazoth

    Stranger

  • Premium Member
  • 7 posts

I followed the instructions, but the message is back every time I open LOOT, is my game broken? Because I haven’t even started modding, I’m just following a youtube video on Mod Organiser 2 at this point … I didn’t get this message before I used SEEEdit on my ESMs

  • Back to top

#1

Posted 12 June 2017 — 01:34 am

KastSkyrim

    Newbie

  • Members
  • Pip
  • 10 posts

LOOT has been giving me an error message that I have never seen before.  It’s a red box that says the metadata has been lost.  If I then run LOOT once or twice the message goes away, but in the process it also deletes all of the metadata that I have put in on my own which means that I have to go back each time to re-add those things.  Does anyone know what is causing this?  

(Not sure if this matters but I am running it through MO)

  • Back to top

#2



KastSkyrim

Posted 12 June 2017 — 07:50 am

KastSkyrim

    Newbie

  • Members
  • Pip
  • 10 posts

It happened again and this time I was able to CnP the error message.

«An error occurred while parsing the metadata list(s): yaml-cpp: error at line 201, column 13: bad conversion: ‘text’ key missing from ‘message content’ object.

Try updating your masterlist to resolve the error. If the error is with your user metadata, this probably happened because an update to LOOT changed its metadata syntax support. Your user metadata will have to be updated manually.

To do so, use the ‘Open Debug Log Location’ in LOOT’s main menu to open its data folder, then open your ‘userlist.yaml’ file in the relevant game folder. You can then edit the metadata it contains with reference to the documentation, which is accessible through LOOT’s main menu.

You can also seek support on LOOT’s forum thread, which is linked to on LOOT’s website

I went to the website but there isn’t much information there for checking.  Does anyone know what is causing this?  

  • Back to top

#3



ymf331

Posted 12 June 2017 — 09:19 am

it looks like you had added user metadata before loot updated for sse. it says in the first line what’s missing from your ‘userlist.yaml’ file and where. if you can paste the contents here i can probably help you pinpoint your problem.

  • Back to top

#4



metaforce

Posted 12 June 2017 — 10:47 am

I’m probably going to be the devils advocate here, but…….I would advise against sorting your loadorder with LOOT anyway. The longer your loadorder the worse the job LOOT does will become. Sort them by hand. Its a chunk of work but the results are far better than the mess LOOT creates sometimes. (I’ve seen quite a number of mods being put after merged patches and bashed patches….that is a complete nono) LOOT is still useful to populate your mods with delev, relev, location and other keywords so that Wrye Bash can do its magic for leveled lists and such. However the longer your loadorder gets the worse LOOT’s job will eventually become.

  • Back to top

#5



younglionsp88

Posted 18 September 2017 — 03:20 am

younglionsp88

    Stranger

  • Members
  • Pip
  • 1 posts

It happened again and this time I was able to CnP the error message.

«An error occurred while parsing the metadata list(s): yaml-cpp: error at line 201, column 13: bad conversion: ‘text’ key missing from ‘message content’ object.

Try updating your masterlist to resolve the error. If the error is with your user metadata, this probably happened because an update to LOOT changed its metadata syntax support. Your user metadata will have to be updated manually.

To do so, use the ‘Open Debug Log Location’ in LOOT’s main menu to open its data folder, then open your ‘userlist.yaml’ file in the relevant game folder. You can then edit the metadata it contains with reference to the documentation, which is accessible through LOOT’s main menu.

You can also seek support on LOOT’s forum thread, which is linked to on LOOT’s website

I went to the website but there isn’t much information there for checking.  Does anyone know what is causing this?  

I got the same error, but I fixed it by just sorting with in the LOOT app.

1. Open MO

2. Select the LOOT application  from the drop down menu (top right side of the screen)

3. Left click on run

4.  Once LOOT opens click on sort plugins (3 lines on the top right)

5. Let it run and apply if needed. (I did not need to apply)

6. Re-open LOOT the error message should be gone or at least it was for me.

Hope this helps 

Edited by younglionsp88, 18 September 2017 — 03:21 am.

  • Back to top

#6



loen999

Posted 10 November 2017 — 04:25 pm

It happened again and this time I was able to CnP the error message.

«An error occurred while parsing the metadata list(s): yaml-cpp: error at line 201, column 13: bad conversion: ‘text’ key missing from ‘message content’ object.

Try updating your masterlist to resolve the error. If the error is with your user metadata, this probably happened because an update to LOOT changed its metadata syntax support. Your user metadata will have to be updated manually.

To do so, use the ‘Open Debug Log Location’ in LOOT’s main menu to open its data folder, then open your ‘userlist.yaml’ file in the relevant game folder. You can then edit the metadata it contains with reference to the documentation, which is accessible through LOOT’s main menu.

You can also seek support on LOOT’s forum thread, which is linked to on LOOT’s website

I went to the website but there isn’t much information there for checking.  Does anyone know what is causing this?  

I got the same error, but I fixed it by just sorting with in the LOOT app.

1. Open MO

2. Select the LOOT application  from the drop down menu (top right side of the screen)

3. Left click on run

4.  Once LOOT opens click on sort plugins (3 lines on the top right)

5. Let it run and apply if needed. (I did not need to apply)

6. Re-open LOOT the error message should be gone or at least it was for me.

Hope this helps 

i am sure the point is his personal metadata missing, not how to simply clear it error out.

  • Back to top

#7



RazielAtazoth

Posted 27 March 2021 — 09:35 am

RazielAtazoth

    Stranger

  • Premium Member
  • 7 posts

I followed the instructions, but the message is back every time I open LOOT, is my game broken? Because I haven’t even started modding, I’m just following a youtube video on Mod Organiser 2 at this point … I didn’t get this message before I used SEEEdit on my ESMs

  • Back to top

When I load loot I get the following error:

«An error occurred while parsing the metadata list(s): yaml-cpp: error at line 201, column 13: bad conversion: ‘text’ key missing from ‘message content’ object.
Try updating your masterlist to resolve the error. If the error is with your user metadata, this probably happened because an update to LOOT changed its metadata syntax support. Your user metadata will have to be updated manually.
To do so, use the ‘Open Debug Log Location’ in LOOT’s main menu to open its data folder, then open your ‘userlist.yaml’ file in the relevant game folder. You can then edit the metadata it contains with reference to the documentation, which is accessible through LOOT’s main menu.»

And, of course I cannot sort my mods.

I haven’t played Skyrim for two years and I was using Loot back then with NMM. Four days ago I downloaded MO and installed the most recent version of Loot (to operate within MO) and began building a mod set up which uses almost none of the mods I used before. However, looking at the top of the Loot page I read, «Masterlist Date: 2016-02-04″ and I need nothing from that list of mods.»

While I found a «settings.yaml» and even a «masterlist.yaml», I could find no «userlist.yaml»

So, I’m stuck here waiting to sort and then play. I look forward to hearing from you.

When I load loot I get the following error:

«An error occurred while parsing the metadata list(s): yaml-cpp: error at line 201, column 13: bad conversion: ‘text’ key missing from ‘message content’ object.
Try updating your masterlist to resolve the error. If the error is with your user metadata, this probably happened because an update to LOOT changed its metadata syntax support. Your user metadata will have to be updated manually.
To do so, use the ‘Open Debug Log Location’ in LOOT’s main menu to open its data folder, then open your ‘userlist.yaml’ file in the relevant game folder. You can then edit the metadata it contains with reference to the documentation, which is accessible through LOOT’s main menu.»

And, of course I cannot sort my mods.

I haven’t played Skyrim for two years and I was using Loot back then with NMM. Four days ago I downloaded MO and installed the most recent version of Loot (to operate within MO) and began building a mod set up which uses almost none of the mods I used before. However, looking at the top of the Loot page I read, «Masterlist Date: 2016-02-04″ and I need nothing from that list of mods.»

While I found a «settings.yaml» and even a «masterlist.yaml», I could find no «userlist.yaml»

So, I’m stuck here waiting to sort and then play. I look forward to hearing from you.


Я использую следующую команду (Windows-машина) с версией оболочки MongoDB: 3.0.7:

mongod --config "G:NodeAppsmongod.cfg" --install

Содержимое файла mongod.cfg приведено ниже:

systemLog:
    destination: file
    path:"G:NodeAppsdatalog"
storage:
    dbPath:"G:NodeAppsdata"

Получение ошибки ниже:

Error parsing YAML config file: yaml-cpp: error at line 4, column 8: illegal map value
try 'mongod --help' for more information

Подобные вопросы не имеют решения для этого.

Что я уже пробовал:

  1. Я использую пробелы (не вкладки)
  2. Я не пытался сохранить файл в формате ASCII, так как в одном из сообщений упоминалось, что файл конфигурации Mongod не следует сохранять в формате, отличном от ACSII. Даже в UTF-8.

Пожалуйста, помогите мне с этим.

Ответы:


В сообщениях об ошибках указывается конкретная строка и столбец, в которых у синтаксического анализатора YAML есть проблема с вашим файлом конфигурации, но если вы не знакомы с форматом, может быть трудно определить, что ожидается.

Два набора изменений необходимы, чтобы сделать вашу конфигурацию допустимой YAML :

  1. Добавить «пространство» между systemLog.pathи storage.dbPathключей и их значения

    YAML требует пробела между парами ключ / значение, поэтому сообщает: «ошибка в строке 4, столбец 8: недопустимое значение карты».

  2. Удалите двойные кавычки из ваших значений пути

    YAML интерпретирует обратную косую черту внутри строк в кавычках как ввод escape-символа, поэтому сообщает: «ошибка в строке 3, столбец 16: неизвестный escape-символ». В качестве альтернативы вы также можете оставить путь в кавычках, но либо избежать обратной косой черты ( ), либо использовать прямую косую черту .

Следующая конфигурация должна работать (при условии, что у "G:NodeAppsdata"нее есть правильный каталог и права доступа к файлу):

systemLog:
    destination: file
    path: G:NodeAppsdatalog
storage:
    dbPath: G:NodeAppsdata

Существует несколько онлайн-тестеров для синтаксиса YAML, которые могут быть полезны для устранения неполадок (например, YAML Lint ).


yaml НЕ принимайте табуляцию, вы должны использовать пробел вместо табуляции

systemLog:
    destination: file
    path: c:datalogmongod.log
storage:
    dbPath: c:datadb
security:
     authorization: enabled
net:
    bindIp: 127.0.0.1
    port: 27017

выше мой файл mongod.cfg,
например, между security: и authorization, должен быть пробел, табуляция неверна, вы увидите ошибку выше в заголовке.

Вы должны всегда проверять свой конфигурационный файл в

проверить Ямл


  1. Диск NodeApps, Data, log in G должен существовать.
  2. Пространство должно существовать между «путь: G:»
  3. Вся линия должна быть на одном расстоянии.

    системный журнал:

    назначение: файл

    Путь: G: / NodeApps / данные / Журнал

    место хранения:

    dbPath: G: / NodeApps / data


«» следует заменить двойной косой чертой («») в Windows

I’m using the following command (Windows machine) with the MongoDB shell version: 3.0.7:

mongod --config "G:NodeAppsmongod.cfg" --install

Contents of mongod.cfg file are given below:

systemLog:
    destination: file
    path:"G:NodeAppsdatalog"
storage:
    dbPath:"G:NodeAppsdata"

Getting the below error:

Error parsing YAML config file: yaml-cpp: error at line 4, column 8: illegal map value
try 'mongod --help' for more information

Similar questions doesn’t have the solutions for this.

What I’ve already tried:

  1. I’m using spaces (not tabs)
  2. I’tried by saving the file in ASCII format, as It was mentioned in one of the posts that Mongod config file shouldn’t be saved in non-ACSII format. Not even in UTF-8.

Please help me with this.

asked Nov 4, 2015 at 4:44

Raj Wadhwa's user avatar

The error messages indicate the specific line and column where the YAML parser is having an issue with your configuration file, but if you’re not familiar with the format it can be difficult to work out what is expected.

Two sets of changes are required to make your config valid YAML:

  1. Add a «space» between the systemLog.path and storage.dbPath keys and their values

    YAML requires a space between key/value pairs, so reports: «error at line 4, column 8: illegal map value».

  2. Remove the double quotes from your path values

    YAML interprets backslashes inside quoted strings as introducing an escape character, so reports: «error at line 3, column 16: unknown escape character». As an alternative, you could also leave the path quoted but either escape the backslashes () or use forward slashes.

The following config should work (assuming "G:NodeAppsdata" has the correct directory and file permissions):

systemLog:
    destination: file
    path: G:NodeAppsdatalog
storage:
    dbPath: G:NodeAppsdata

There are several online testers for YAML syntax that can be useful to troubleshoot problems (eg: YAML Lint).

Community's user avatar

answered Nov 4, 2015 at 12:07

Stennie's user avatar

StennieStennie

10k2 gold badges27 silver badges45 bronze badges

0

yaml do NOT accept tab, you must use space instead of tab

systemLog:
    destination: file
    path: c:datalogmongod.log
storage:
    dbPath: c:datadb
security:
     authorization: enabled
net:
    bindIp: 127.0.0.1
    port: 27017

above is my mongod.cfg file,
for example between security: and authorization, must be space, tab is invalid will give you the error above on title.

you should alway validate your config file at

validate yaml

answered Feb 16, 2017 at 22:24

hoogw's user avatar

hoogwhoogw

1393 bronze badges

  1. The «NodeApps, Data, log in G» drive must exist.
  2. Space must exist between «path:G:»
  3. All line must be one space distance.

    systemLog:

    destination: file

    path:G:/NodeApps/data/log

    storage:

    dbPath: G:/NodeApps/data

answered May 7, 2017 at 6:34

BehrouzMoslem's user avatar

«» should be replaced with double slash («») when in windows

answered Mar 10, 2017 at 9:07

user119421's user avatar

0

Make sure these two files exist:

/usr/local/lib/libyaml-cpp.a
/usr/local/include/yaml-cpp/yaml.h

My CMakeLists.txt:

CMAKE_MINIMUM_REQUIRED(VERSION 3.4)
FIND_PACKAGE(yaml-cpp REQUIRED)
ADD_EXECUTABLE(yaml_cpp_test yaml_cpp_test.cpp)
TARGET_LINK_LIBRARIES(yaml_cpp_test yaml-cpp)

The content of yaml_cpp_test.cpp is same as mentioned in the question.


I try to reappear the problem on vps (Ubuntu 14.04.1 LTS)

wget -c https://github.com/jbeder/yaml-cpp/archive/release-0.5.1.tar.gz
tar xvf release-0.5.1.tar.gz yaml-cpp-release-0.5.1/
cd yaml-cpp-release-0.5.1/
sudo apt-get install cmake
sudo apt-get install libboost-dev
cmake .
make
make install

after that, yaml-cpp install to /usr/local/lib and /usr/local/include
files in my working directory:

fqlgy@li407-86:~/yaml-cpp$ ll
total 12
-rw-r--r-- 1 fqlgy fqlgy 162 May  8 03:29 CMakeLists.txt
-rw-r--r-- 1 fqlgy fqlgy  10 May  8 03:11 test.yaml
-rw-r--r-- 1 fqlgy fqlgy 240 May  8 03:11 yaml_cpp_test.cpp

As i tried to run «cmake .», there is some error, so i delete the line CMakeFiles/CMakeOutput.log, the content of CMakeLists.txt is :

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
ADD_EXECUTABLE(yaml_cpp_test yaml_cpp_test.cpp)
TARGET_LINK_LIBRARIES(yaml_cpp_test yaml-cpp)

The following output is as expected:

fqlgy@li407-86:~/yaml-cpp$ cmake .
-- Configuring done
-- Generating done
-- Build files have been written to: /home/fqlgy/yaml-cpp
fqlgy@li407-86:~/yaml-cpp$ make
Scanning dependencies of target yaml_cpp_test
[100%] Building CXX object CMakeFiles/yaml_cpp_test.dir/yaml_cpp_test.cpp.o
Linking CXX executable yaml_cpp_test
[100%] Built target yaml_cpp_test
fqlgy@li407-86:~/yaml-cpp$ ./yaml_cpp_test
HELLO

Вот полный журнал:

/tmp/ccCvErNZ.o: In function `YAML::detail::node& YAML::detail::node_data::get<std::string>(std::string const&, std::shared_ptr<YAML::detail::memory_holder>)':
cricket.cpp:(.text._ZN4YAML6detail9node_data3getISsEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getISsEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0x94): undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder>)'
collect2: error: ld returned 1 exit status

Код, который я пытаюсь скомпилировать, прост

#include <iostream>
#include <yaml-cpp/yaml.h>

using namespace std;

int main() {
YAML::Node test = YAML::LoadFile("test.yaml");
if (test["date"]) {
cout << "HELLO";
}

return 0;
}

ЯМЛ, который я использую, является примером из http://www.yaml.org/start.html

Если я просто пытаюсь загрузить YAML, он загружается нормально. Но если я пытаюсь получить доступ к любым данным, я получаю ту же ошибку. Так что это не проблема связывания.

РЕДАКТИРОВАТЬ: я могу делать такие вещи, как cout << test а также cout << test.type() и другие функции. Я думаю, что проблема заключается в использовании строковой карты для доступа к внутренним узлам.

2

Решение

Кажется, вы не правильно связываете yaml-cpp библиотека. Добавьте аргумент -lyaml-cpp при компиляции. Например:

g++ -I/usr/local/include -L/usr/local/lib -lyaml-cpp -o test main.cpp

РЕДАКТИРОВАТЬ

Другой вариант — включить этот cmake в ваш CMakeLists.txt:

# attempt to find static library first if this is set
if(YAMLCPP_STATIC_LIBRARY)
set(YAMLCPP_STATIC libyaml-cpp.a)
endif()

# find the yaml-cpp include directory
find_path(YAMLCPP_INCLUDE_DIR yaml-cpp/yaml.h
PATH_SUFFIXES include
PATHS
~/Library/Frameworks/yaml-cpp/include/
/Library/Frameworks/yaml-cpp/include/
/usr/local/include/
/usr/include/
/sw/yaml-cpp/         # Fink
/opt/local/yaml-cpp/  # DarwinPorts
/opt/csw/yaml-cpp/    # Blastwave
/opt/yaml-cpp/
${YAMLCPP_DIR}/include/)

# find the yaml-cpp library
find_library(YAMLCPP_LIBRARY
NAMES ${YAMLCPP_STATIC} yaml-cpp
PATH_SUFFIXES lib64 lib
PATHS ~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
${YAMLCPP_DIR}/lib)

# handle the QUIETLY and REQUIRED arguments and set YAMLCPP_FOUND to TRUE if all listed variables are TRUE
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(YAMLCPP DEFAULT_MSG YAMLCPP_INCLUDE_DIR YAMLCPP_LIBRARY)
mark_as_advanced(YAMLCPP_INCLUDE_DIR YAMLCPP_LIBRARY)

3

Другие решения

Я испытал нечто похожее на это, когда пытался скомпилировать OpenXcom в системе Debian. Оказалось, что я использовал сочетание тестируемых и стабильных пакетов, пакет yaml был из стабильного, и комбинация каким-то образом приводила к сбоям при связывании, если было несколько исходных функций.

Если это то, что вы испытываете (и вы тоже используете Debian), попробуйте скомпилировать пакет с исходным кодом из стабильного

apt-get --build source libyaml-cpp0.5/stable

Эта команда создаст пакеты .deb для libyaml, и затем вы можете вставить их с помощью команды dpkg следующим образом:

dpkg -i libyaml-cpp0.5*.deb

как корень.

Компиляция libyaml из исходного кода сделает его связующим с уже имеющимися у вас библиотеками тестирования, вместо того, чтобы ожидать стабильных библиотек, и поэтому должен решить проблему выше. По крайней мере, для меня.

Даже если вы не используете Debian, компиляция yaml-cpp из исходного кода (например, tarball) может работать по аналогичным причинам.

2

Убедитесь, что эти два файла существуют:

/usr/local/lib/libyaml-cpp.a
/usr/local/include/yaml-cpp/yaml.h

Мой CMakeLists.txt:

CMAKE_MINIMUM_REQUIRED(VERSION 3.4)
FIND_PACKAGE(yaml-cpp REQUIRED)
ADD_EXECUTABLE(yaml_cpp_test yaml_cpp_test.cpp)
TARGET_LINK_LIBRARIES(yaml_cpp_test yaml-cpp)

Содержимое yaml_cpp_test.cpp такое же, как указано в вопросе.


Я пытаюсь вновь появиться проблема на VPS (Ubuntu 14.04.1 LTS)

wget -c https://github.com/jbeder/yaml-cpp/archive/release-0.5.1.tar.gz
tar xvf release-0.5.1.tar.gz yaml-cpp-release-0.5.1/
cd yaml-cpp-release-0.5.1/
sudo apt-get install cmake
sudo apt-get install libboost-dev
cmake .
make
make install

после этого yaml-cpp устанавливается в / usr / local / lib и / usr / local / include
файлы в моем рабочем каталоге:

fqlgy@li407-86:~/yaml-cpp$ ll
total 12
-rw-r--r-- 1 fqlgy fqlgy 162 May  8 03:29 CMakeLists.txt
-rw-r--r-- 1 fqlgy fqlgy  10 May  8 03:11 test.yaml
-rw-r--r-- 1 fqlgy fqlgy 240 May  8 03:11 yaml_cpp_test.cpp

Когда я попытался запустить «cmake.», Произошла ошибка, поэтому я удалил строку CMakeFiles/CMakeOutput.logсодержимое CMakeLists.txt:

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
ADD_EXECUTABLE(yaml_cpp_test yaml_cpp_test.cpp)
TARGET_LINK_LIBRARIES(yaml_cpp_test yaml-cpp)

Следующий результат, как и ожидалось:

fqlgy@li407-86:~/yaml-cpp$ cmake .
-- Configuring done
-- Generating done
-- Build files have been written to: /home/fqlgy/yaml-cpp
fqlgy@li407-86:~/yaml-cpp$ make
Scanning dependencies of target yaml_cpp_test
[100%] Building CXX object CMakeFiles/yaml_cpp_test.dir/yaml_cpp_test.cpp.o
Linking CXX executable yaml_cpp_test
[100%] Built target yaml_cpp_test
fqlgy@li407-86:~/yaml-cpp$ ./yaml_cpp_test
HELLO

1

Я пытаюсь использовать yaml-cpp и согласно Вики, это системная зависимость, поэтому нам даже не нужно изменять CMakelists.txt или manifest.xml. Однако, когда я компилирую код, я все равно получаю такие ошибки, как:

/home/aramus/fuerte_workspace/sandbox/image_test/src/image_test.cpp:53: undefined reference to `YAML::Parser::Parser(std::basic_istream<char, std::char_traits<char> >&)'
/home/aramus/fuerte_workspace/sandbox/image_test/src/image_test.cpp:54: undefined reference to `YAML::Node::Node()'
/home/aramus/fuerte_workspace/sandbox/image_test/src/image_test.cpp:92: undefined reference to `YAML::Node::~Node()'
/home/aramus/fuerte_workspace/sandbox/image_test/src/image_test.cpp:92: undefined reference to `YAML::Parser::~Parser()'
/home/aramus/fuerte_workspace/sandbox/image_test/src/image_test.cpp:92: undefined reference to `YAML::Node::~Node()'
/home/aramus/fuerte_workspace/sandbox/image_test/src/image_test.cpp:92: undefined reference to `YAML::Parser::~Parser()'
/home/aramus/fuerte_workspace/sandbox/image_test/src/image_test.cpp:92: undefined reference to `YAML::Node::~Node()'
/home/aramus/fuerte_workspace/sandbox/image_test/src/image_test.cpp:92: undefined reference to `YAML::Parser::~Parser()'

Единственный код, который я добавил в CMakeLists.txt:

target_link_libraries(${PROJECT_NAME} yaml-cpp)
rosbuild_add_executable(image_test src/image_test.cpp)

Я использую fuerte в Linux. Любые решения кто-нибудь?

РЕДАКТИРОВАТЬ: я нашел свое решение! Я изменил свой CMakeLists.txt, чтобы сначала создать исполняемый файл, а затем добавить библиотеку yaml-cpp!

rosbuild_add_executable(image_test src/image_test.cpp)
target_link_libraries(image_test yaml-cpp)

Эти две строки в моем CMakeLists.txt работают нормально!

Я пытаюсь преобразовать информацию из файла .yaml с калибровкой камеры в сообщение «sensor_msgs :: CameraInfo» в ROS.

Мне удается разобрать как INT, так и строки, но возникают проблемы, когда я добираюсь до двойного вектора / матрицы.

Вот мой код:

sensor_msgs::CameraInfo yamlToCameraInfo(std::string leftOrRightCam)
{
  YAML::Node camera_info_yaml = YAML::LoadFile(leftOrRightCam + ".yaml");
  sensor_msgs::CameraInfo camera_info_msg;
  camera_info_msg.width = camera_info_yaml["image_width"].as<uint32_t>();
  camera_info_msg.height = camera_info_yaml["image_height"].as<uint32_t>();
  camera_info_msg.distortion_model = camera_info_yaml["distortion_model"].as<std::string>();
  camera_info_msg.D = camera_info_yaml["distortion_coefficients"].as<double>();
  camera_info_msg.K = camera_info_yaml["camera_matrix"].as<double>();

  return camera_info_msg;

}

Я получаю такую ​​ошибку:

error: no match for ‘operator=’ (operand types are
‘sensor_msgs::CameraInfo_ >::_D_type {aka
std::vector >}’ and ‘double’)
camera_info_msg.D =
camera_info_yaml[«distortion_coefficients»].as();

Документация для сообщения cameraInfo находится здесь: http://docs.ros.org/api/sensor_msgs/html/msg/CameraInfo.html

Учебник для пакета yaml-cpp: https://github.com/jbeder/yaml-cpp/wiki/Tutorial

Часть моего файла yaml «Коэффициенты искажения» выглядит так:

distortion_coefficients:
rows: 1
cols: 5
data: [-0.167477, 0.023595, 0.004069, -0.002996, 0.000000]

Кто-нибудь знает, что я делаю не так?

Hi, I get this error and I have no idea how to solve it, I would like to know if you can help me

An error occurred while parsing the metadata list(s): yaml-cpp: error at line 201, column 13: bad conversion: ‘text’ key missing from ‘message content object.

Try updating your masterlist to resolve the error. If the error is with your user metadata, this probably happened because an update to LOOT changed its metadata syntax support. Your user metadata will have to be updated manually.

To do so, use the ‘Open Debug Log Location in LOOT’s main menu to open its data folder, then open your userlist yaml file in the relevant game folder. You can then edit the metadata it contains with reference to the documentation, which is accessible through LOOT’s main menu.

You can also seek support on LOOT’s forum thread, which is linked to on=WDA


Я использую следующую команду (Windows-машина) с версией оболочки MongoDB: 3.0.7:

mongod --config "G:NodeAppsmongod.cfg" --install

Содержимое файла mongod.cfg приведено ниже:

systemLog:
    destination: file
    path:"G:NodeAppsdatalog"
storage:
    dbPath:"G:NodeAppsdata"

Получение ошибки ниже:

Error parsing YAML config file: yaml-cpp: error at line 4, column 8: illegal map value
try 'mongod --help' for more information

Подобные вопросы не имеют решения для этого.

Что я уже пробовал:

  1. Я использую пробелы (не вкладки)
  2. Я не пытался сохранить файл в формате ASCII, так как в одном из сообщений упоминалось, что файл конфигурации Mongod не следует сохранять в формате, отличном от ACSII. Даже в UTF-8.

Пожалуйста, помогите мне с этим.

Ответы:


В сообщениях об ошибках указывается конкретная строка и столбец, в которых у синтаксического анализатора YAML есть проблема с вашим файлом конфигурации, но если вы не знакомы с форматом, может быть трудно определить, что ожидается.

Два набора изменений необходимы, чтобы сделать вашу конфигурацию допустимой YAML :

  1. Добавить «пространство» между systemLog.pathи storage.dbPathключей и их значения

    YAML требует пробела между парами ключ / значение, поэтому сообщает: «ошибка в строке 4, столбец 8: недопустимое значение карты».

  2. Удалите двойные кавычки из ваших значений пути

    YAML интерпретирует обратную косую черту внутри строк в кавычках как ввод escape-символа, поэтому сообщает: «ошибка в строке 3, столбец 16: неизвестный escape-символ». В качестве альтернативы вы также можете оставить путь в кавычках, но либо избежать обратной косой черты ( \), либо использовать прямую косую черту .

Следующая конфигурация должна работать (при условии, что у "G:NodeAppsdata"нее есть правильный каталог и права доступа к файлу):

systemLog:
    destination: file
    path: G:NodeAppsdatalog
storage:
    dbPath: G:NodeAppsdata

Существует несколько онлайн-тестеров для синтаксиса YAML, которые могут быть полезны для устранения неполадок (например, YAML Lint ).


yaml НЕ принимайте табуляцию, вы должны использовать пробел вместо табуляции

systemLog:
    destination: file
    path: c:datalogmongod.log
storage:
    dbPath: c:datadb
security:
     authorization: enabled
net:
    bindIp: 127.0.0.1
    port: 27017

выше мой файл mongod.cfg,
например, между security: и authorization, должен быть пробел, табуляция неверна, вы увидите ошибку выше в заголовке.

Вы должны всегда проверять свой конфигурационный файл в

проверить Ямл


  1. Диск NodeApps, Data, log in G должен существовать.
  2. Пространство должно существовать между «путь: G:»
  3. Вся линия должна быть на одном расстоянии.

    системный журнал:

    назначение: файл

    Путь: G: / NodeApps / данные / Журнал

    место хранения:

    dbPath: G: / NodeApps / data


«» следует заменить двойной косой чертой («») в Windows

I’m using the following command (Windows machine) with the MongoDB shell version: 3.0.7:

mongod --config "G:NodeAppsmongod.cfg" --install

Contents of mongod.cfg file are given below:

systemLog:
    destination: file
    path:"G:NodeAppsdatalog"
storage:
    dbPath:"G:NodeAppsdata"

Getting the below error:

Error parsing YAML config file: yaml-cpp: error at line 4, column 8: illegal map value
try 'mongod --help' for more information

Similar questions doesn’t have the solutions for this.

What I’ve already tried:

  1. I’m using spaces (not tabs)
  2. I’tried by saving the file in ASCII format, as It was mentioned in one of the posts that Mongod config file shouldn’t be saved in non-ACSII format. Not even in UTF-8.

Please help me with this.

asked Nov 4, 2015 at 4:44

Raj Wadhwa's user avatar

The error messages indicate the specific line and column where the YAML parser is having an issue with your configuration file, but if you’re not familiar with the format it can be difficult to work out what is expected.

Two sets of changes are required to make your config valid YAML:

  1. Add a «space» between the systemLog.path and storage.dbPath keys and their values

    YAML requires a space between key/value pairs, so reports: «error at line 4, column 8: illegal map value».

  2. Remove the double quotes from your path values

    YAML interprets backslashes inside quoted strings as introducing an escape character, so reports: «error at line 3, column 16: unknown escape character». As an alternative, you could also leave the path quoted but either escape the backslashes (\) or use forward slashes.

The following config should work (assuming "G:NodeAppsdata" has the correct directory and file permissions):

systemLog:
    destination: file
    path: G:NodeAppsdatalog
storage:
    dbPath: G:NodeAppsdata

There are several online testers for YAML syntax that can be useful to troubleshoot problems (eg: YAML Lint).

Community's user avatar

answered Nov 4, 2015 at 12:07

Stennie's user avatar

StennieStennie

10.1k2 gold badges28 silver badges46 bronze badges

0

yaml do NOT accept tab, you must use space instead of tab

systemLog:
    destination: file
    path: c:datalogmongod.log
storage:
    dbPath: c:datadb
security:
     authorization: enabled
net:
    bindIp: 127.0.0.1
    port: 27017

above is my mongod.cfg file,
for example between security: and authorization, must be space, tab is invalid will give you the error above on title.

you should alway validate your config file at

validate yaml

answered Feb 16, 2017 at 22:24

hoogw's user avatar

hoogwhoogw

1393 bronze badges

  1. The «NodeApps, Data, log in G» drive must exist.
  2. Space must exist between «path:G:»
  3. All line must be one space distance.

    systemLog:

    destination: file

    path:G:/NodeApps/data/log

    storage:

    dbPath: G:/NodeApps/data

answered May 7, 2017 at 6:34

BehrouzMoslem's user avatar

«» should be replaced with double slash («») when in windows

answered Mar 10, 2017 at 9:07

user119421's user avatar

0

  • Произошла ошибка при обработке отчета rsprocessingaborted
  • Произошла ошибка при обновлении dota 2 ошибка записи на диск
  • Произошла ошибка при настройке свойств сканера если запущена другая kyocera
  • Произошла ошибка при обработке заявления не соответствует формат электронной цифровой подписи эцп
  • Произошла ошибка при обновлении counter strike global offensive ошибка при записи на диск