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

Logseq token does not accept "@oracle:eval" #1063

Open
mrVanDalo opened this issue Sep 13, 2024 · 1 comment
Open

Logseq token does not accept "@oracle:eval" #1063

mrVanDalo opened this issue Sep 13, 2024 · 1 comment

Comments

@mrVanDalo
Copy link

I have to set the token (like described in the documentation : https://bugwarrior.readthedocs.io/en/latest/services/logseq.html#example-service)

But usually I use @oracle:eval:pass like I would do here.

token = "@oracle:eval:pass show home/logseq/bugwarrior-api-key"

But this results in Access Denied error

ERROR:bugwarrior.collect:Worker for [logseq] failed: Non-200 status code 401; 'http://localhost:12315/api'; '{"statusCode":401,"error":"Unauthorized","message":"Access Denied!"}'
Traceback (most recent call last):
  File "/nix/store/gv2gg4naicngzcw7rccjf522qyw0i57d-python3.11-bugwarrior-1.8.0/lib/python3.11/site-packages/bugwarrior/collect.py", line 36, in _aggregate_issues
    for issue in service.issues():
  File "/nix/store/gv2gg4naicngzcw7rccjf522qyw0i57d-python3.11-bugwarrior-1.8.0/lib/python3.11/site-packages/bugwarrior/services/logseq.py", line 306, in issues
    graph_name = self.client.get_graph_name()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/gv2gg4naicngzcw7rccjf522qyw0i57d-python3.11-bugwarrior-1.8.0/lib/python3.11/site-packages/bugwarrior/services/logseq.py", line 68, in get_graph_name
    graph = self._get_current_graph()
            ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/gv2gg4naicngzcw7rccjf522qyw0i57d-python3.11-bugwarrior-1.8.0/lib/python3.11/site-packages/bugwarrior/services/logseq.py", line 62, in _get_current_graph
    return self.json_response(response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/gv2gg4naicngzcw7rccjf522qyw0i57d-python3.11-bugwarrior-1.8.0/lib/python3.11/site-packages/bugwarrior/services/__init__.py", line 309, in json_response
    raise OSError(
OSError: Non-200 status code 401; 'http://localhost:12315/api'; '{"statusCode":401,"error":"Unauthorized","message":"Access Denied!"}'

Setting

token = "the-secret-token-value-inlined"

And all works fine.

Using revision : 25e99834ef79e0a8c7141943810e0aa5152d6710 with python 3.11.

My config is

[logseq]
add_tags = "bugwarrior,logseq"
description_template = "{{logseqtitle}}"
service = "logseq"
token = "@oracle:eval:pass show home/logseq/bugwarrior-api-key"
@mrVanDalo mrVanDalo changed the title Logseq token does not accept "@oracle.eval" Logseq token does not accept "@oracle:eval" Sep 13, 2024
@ryneeverett ryneeverett added this to the release-next milestone Sep 14, 2024
@ryneeverett
Copy link
Collaborator

Thanks for the report. We ought to be using self.get_password to process the oracle in the client and I see that we are not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants