Error with YAML deep nesting - yaml

I wanted to create a config file in YAML that stores a few translations. To encapsulate everything, I began to nest the options.
While parsing the file, I see the following error:
Failed to read data from customize.yaml\customize.yaml: yaml: line 30: mapping values are not allow
ed in this context
The parser refers to the following lines:
contact:
title: Contact
form:
name: Name
error: Please enter your name.
email: Email
error: Please enter your email address.
phone: Phone
error: Please enter your phone number.
message: Message
error: Please enter a message.
send: Send

If you want the value as well as the error messages to "belong" to the key, you need to make a list of two items
name:
- Name
- error: Please enter your name.
or as another mapping with two items:
name:
value: Name
error: Please enter your name.

Related

Pentaho Kettle Failed to parse Number: For input string: "null" error

I am new to Pentaho Kettle and I am trying to read simple data (.DBF file) with Xbase. But I keep getting errors when reading my DBF data file
The error is:
... Unable to read row from XBase file; Failed to parse Number: For input string: "null";Caused by: com.linuxense.javadbf.DBFException: Failed to parse Number: For input string: "null"
What does this mean exactly and how do I handle it?
Thank you in advance

Docs example of user module fails with matching version of ansible-playbook

I'm using Ansible v2.9.10 and trying to use the user module by following the official docs here:
https://docs.ansible.com/ansible/2.9/modules/user_module.html
I failed to use it, and I'm getting an error even when trying to run the example straight from the docs:
- name: Add the user 'johnd' with a specific uid and a primary group of 'admin'
user:
name: johnd
comment: John Doe
uid: 1040
group: admin
Like so:
$ ansible-playbook my-provision.yaml --check
I'm getting the following error:
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
ERROR! The field 'remote_user' is supposed to be a string type, however the incoming data structure is a <class 'ansible.parsing.yaml.objects.AnsibleMapping'>
The error appears to be in 'my-provision.yaml': line 1, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Add the user 'johnd' with a specific uid and a primary group of 'admin'
^ here
Am I missing something?

AWS DMS - Oracle to PG RDS full load operation error - failed to load data from csv file

I am trying to move data from a oracle instance to postgres RDS using DMS. I am only doing a full load operation and I have disabled all the foreign keys on the target. I also made sure that the datatypes are not mismatched between columns for the same tables. I tried both 'Do Nothing' and 'Truncate' for the Target Table preparation mode and when I run the task, several tables are failing with below error messages:
[TARGET_LOAD ]E: Command failed to load data with exit error code 1, Command output: <truncated> [1020403] (csv_target.c:981)
[TARGET_LOAD ]E: Failed to wait for previous run [1020403] (csv_target.c:1578)
[TARGET_LOAD ]E: Failed to load data from csv file. [1020403] (odbc_endpoint_imp.c:5648)
[TARGET_LOAD ]E: Handling End of table 'public'.'SKEWED_VALUES' loading failed by subtask 6 thread 1 [1020403] (endpointshell.c:2416)
DMS doesn't give the correct error information and I am not able to understand what the above error messages mean.
When I use 'Drop tables on target' for the Target table preparation mode, it works but it creates the datatypes of the columns in a different way which I don't want.
Any help would be appreciated.
To troubleshoot my case, I created a copy of the task that only loaded the one problem table, and upped all the logging severities to "Detailed debug". Then I was able to see this:
[TARGET_LOAD ]D: RetCode: SQL_SUCCESS_WITH_INFO SqlState: 42622 NativeError: -1 Message: NOTICE: identifier "diagnosticinterpretationrequestdata_diagnosticinterpretationcode" will be truncated to "diagnosticinterpretationrequestdata_diagnosticinterpretationcod" (ar_odbc_stmt.c:4720)
In the RDS logs for the target DB I found:
2021-10-11 14:30:36 UTC:...:[19259]:ERROR: invalid input syntax for integer: ""
2021-10-11 14:30:36 UTC:...:[19259]:CONTEXT: COPY diagnosticinterpretationrequest, line 1, column diagnosticinterpretationrequestdata_diagnosticinterpretationcod: ""
2021-10-11 14:30:36 UTC:...:[19259]:STATEMENT: COPY "myschema"."diagnosticinterpretationrequest" FROM STDIN WITH DELIMITER ',' CSV NULL 'attNULL' ESCAPE '\'
I found that if I added a table mapping rule to explicitly rename the column to truncate the name within Postgres's limit for identifier length, then things ran ok.
{
"rule-type": "transformation",
"rule-id": "1",
"rule-name": "1",
"rule-target": "column",
"object-locator": {
"schema-name": "%",
"table-name": "%",
"column-name": "diagnosticinterpretationrequestdata_diagnosticinterpretationcode"
},
"rule-action": "rename",
"value": "diagnosticinterpretationrequestdata_diagnosticinterpretationcod",
"old-value": null
},

“ error: "The parameter 'map.net.xml' is not allowed in this context" , when I want to create " .poly.xml" file” in sumo

I have a question about the polyconvert while I was importing a map
from Openstreetmap.
I successfully completed the netconvert commnad and try to get a map.poly
After I execute command:
polyconvert --net-file map.net.xml --osm-files map.osm
--type-file typemap.xml -o map.poly.xml
after that show these errors:
Error: The parameter 'map.net.xml' is not allowed in this context.
Switch or parameter name expected.
Error: Could not parse commandline options. Quitting (on error).
please help me solve this problem.
thanks

What is mean a valid name as a DNS name component?

I write command :
docker stack deploy --compose-file=docker-compose.yml testlogin/test and get this error - Error response from daemon: rpc error: code = 3 desc = name must be valid as a DNS name component
What name is considered valid?
As the error message indicates, the name of the stack is invalid. This is likely due to the / in the name.
The stack name may contain spaces or other special characters.

Resources