Closed fel115 closed 3 months ago
Thank you for reporting this problem!
#0
are the first entry for arrays, so they have a special meaning.
To make this issue reproducible we probably need a longer example, including the mounting of TOML (probably the bug is related to this).
@atmaxinger do you maybe have an idea?
For some reason, it worked today. But then I tried to remove one entry in the array and it removed the whole array. I used kdb rm user:/sw/libelektra/opensesame/#0/current/sensors/loc
to remove the loc entry.
But mounting works without an error
root@messstation:/home/olimex/opensesame/debian# kdb mount -vv /home/olimex/opensesame/files/opensesame.spec spec:/sw/libelektra/opensesame/#0/current ni
root@messstation:/home/olimex/opensesame/debian# kdb spec-mount -vv /sw/libelektra/opensesame/#0/current
Got mountpoint from spec:/sw/libelektra/opensesame/#0/current with 24 nodes, configfile: opensesame.toml and mountpoint: /sw/libelektra/opensesame/#0/current
root@messstation:/home/olimex/opensesame/debian# kdb mount -vv /home/olimex/opensesame/files/opensesame.state.spec spec:/state/libelektra/opensesame/#0/current ni
root@messstation:/home/olimex/opensesame/debian# kdb spec-mount -vv /state/libelektra/opensesame/#0/current ni
Got mountpoint from spec:/state/libelektra/opensesame/#0/current with 3 nodes, configfile: opensesame.state and mountpoint: /state/libelektra/opensesame/#0/current
TOML files used opensesame.spec and opensesame.stat.spec
it removed the whole array
: this is probably another bug. Please give full descriptions of what exactly you did and only describe one bug per issue.
@atmaxinger how can I add an array with kdb editor ...
, I don't understand the syntax in this file. Is there any documentation about it? I wasn't able to find one.
@fel115 you can choose your own syntax, but better use toml to not run into conversation issues. man kdb editor
should work, is this missing in our armhf Debian packages?
Btw. As last resort you can also directly edit ~/.config/opensesame.toml
@markus2330 Thx, now I was able to open the editor with the toml-format. man kdb editor
is working.
I tried to add the array by adding `sensors.#0.loc = "weatherstation" to the ~/.config/opensesame.toml file, but I get this error message:
Validation Syntactic: Line 1~(11:8-11:32): syntax error, unexpected COMMENT, expecting BARE_STRING or LITERAL_STRING or BASIC_STRING
I think you need to quote "#0"
, e.g. sensors."#0".loc = "Gaestezimmer"
. Use git checkout
if you messed up the config to start again.
I think you need to quote
"#0"
, e.g.sensors."#0".loc = "Gaestezimmer"
. Usegit checkout
if you messed up the config to start again.
Perfect, now its working. Thx :relaxed:
I mark this stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping by writing a message here or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart:
I closed this now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue. Thank you for your contributions :sparkling_heart:
After setting a new key/value to the database, elektra can't find the new created key.
With other values, it worked well. Could this be caused by the second
#0
?I also described this issue in this issue of opensesame.