Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't put the same user in bot users and bot admins #18

Open
MayeulC opened this issue Aug 17, 2021 · 1 comment
Open

Can't put the same user in bot users and bot admins #18

MayeulC opened this issue Aug 17, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@MayeulC
Copy link
Collaborator

MayeulC commented Aug 17, 2021

Describe the bug

This creates a duplicate entry in the yaml list. Unfortunately I don't have the logs anymore.

In a related issue, it is unclear how to specify multiple users as bot admins. I don't think this is supported at all.

Also, config is overwrote on upgrade, which is annoying.

@MayeulC MayeulC added the bug Something isn't working label Oct 26, 2021
@Salamandar
Copy link
Member

Salamandar commented Feb 16, 2022

Reproduced. Here's the log :

2022-02-16 13:41:12,338: DEBUG - + /opt/yunohost/mautrix_signal/bin/python3 -m mautrix_signal -g -c /opt/yunohost/mautrix_signal/config.yaml -r /etc/matrix-synapse/app-service/mautrix_signal.yaml
2022-02-16 13:41:14,420: WARNING - Traceback (most recent call last):
2022-02-16 13:41:14,427: WARNING -   File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
2022-02-16 13:41:14,430: WARNING -     return _run_code(code, main_globals, None,
2022-02-16 13:41:14,433: WARNING -   File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
2022-02-16 13:41:14,436: WARNING -     exec(code, run_globals)
2022-02-16 13:41:14,438: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mautrix_signal/__main__.py", line 146, in <module>
2022-02-16 13:41:14,441: WARNING -     SignalBridge().run()
2022-02-16 13:41:14,444: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mautrix/util/program.py", line 91, in run
2022-02-16 13:41:14,447: WARNING -     self._prepare()
2022-02-16 13:41:14,451: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mautrix/util/program.py", line 97, in _prepare
2022-02-16 13:41:14,454: WARNING -     self.preinit()
2022-02-16 13:41:14,457: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mautrix/bridge/bridge.py", line 86, in preinit
2022-02-16 13:41:14,459: WARNING -     super().preinit()
2022-02-16 13:41:14,463: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mautrix/util/program.py", line 117, in preinit
2022-02-16 13:41:14,468: WARNING -     self.prepare_config()
2022-02-16 13:41:14,473: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mautrix/bridge/bridge.py", line 103, in prepare_config
2022-02-16 13:41:14,478: WARNING -     self.load_and_update_config()
2022-02-16 13:41:14,483: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mautrix/util/program.py", line 154, in load_and_update_config
2022-02-16 13:41:14,488: WARNING -     self.config.load()
2022-02-16 13:41:14,492: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/mautrix/util/config/file.py", line 37, in load
2022-02-16 13:41:14,497: WARNING -     self._data = yaml.load(stream)
2022-02-16 13:41:14,502: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/ruamel/yaml/main.py", line 434, in load
2022-02-16 13:41:14,507: WARNING -     return constructor.get_single_data()
2022-02-16 13:41:14,511: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 121, in get_single_data
2022-02-16 13:41:14,516: WARNING -     return self.construct_document(node)
2022-02-16 13:41:14,521: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 131, in construct_document
2022-02-16 13:41:14,524: WARNING -     for _dummy in generator:
2022-02-16 13:41:14,526: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1569, in construct_yaml_map
2022-02-16 13:41:14,528: WARNING -     self.construct_mapping(node, data, deep=True)
2022-02-16 13:41:14,530: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1452, in construct_mapping
2022-02-16 13:41:14,531: WARNING -     value = self.construct_object(value_node, deep=deep)
2022-02-16 13:41:14,533: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 154, in construct_object
2022-02-16 13:41:14,534: WARNING -     data = self.construct_non_recursive_object(node)
2022-02-16 13:41:14,536: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 196, in construct_non_recursive_object
2022-02-16 13:41:14,537: WARNING -     for _dummy in generator:
2022-02-16 13:41:14,539: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1569, in construct_yaml_map
2022-02-16 13:41:14,541: WARNING -     self.construct_mapping(node, data, deep=True)
2022-02-16 13:41:14,543: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1452, in construct_mapping
2022-02-16 13:41:14,545: WARNING -     value = self.construct_object(value_node, deep=deep)
2022-02-16 13:41:14,546: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 154, in construct_object
2022-02-16 13:41:14,548: WARNING -     data = self.construct_non_recursive_object(node)
2022-02-16 13:41:14,550: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 196, in construct_non_recursive_object
2022-02-16 13:41:14,552: WARNING -     for _dummy in generator:
2022-02-16 13:41:14,553: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1569, in construct_yaml_map
2022-02-16 13:41:14,555: WARNING -     self.construct_mapping(node, data, deep=True)
2022-02-16 13:41:14,557: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1453, in construct_mapping
2022-02-16 13:41:14,559: WARNING -     if self.check_mapping_key(node, key_node, maptyp, key, value):
2022-02-16 13:41:14,561: WARNING -   File "/opt/yunohost/mautrix_signal/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 294, in check_mapping_key
2022-02-16 13:41:14,563: WARNING -     raise DuplicateKeyError(*args)
2022-02-16 13:41:14,565: WARNING - ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
2022-02-16 13:41:14,566: WARNING -   in "/opt/yunohost/mautrix_signal/config.yaml", line 234, column 9
2022-02-16 13:41:14,568: WARNING - found duplicate key "@Salamandar:matrix.org" with value "admin" (original value: "user")
2022-02-16 13:41:14,570: WARNING -   in "/opt/yunohost/mautrix_signal/config.yaml", line 236, column 9
2022-02-16 13:41:14,572: DEBUG - 
2022-02-16 13:41:14,573: WARNING - To suppress this check see:
2022-02-16 13:41:14,574: WARNING -     http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys
2022-02-16 13:41:14,576: DEBUG - 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants