looper icon indicating copy to clipboard operation
looper copied to clipboard

Error: looper requires JWT for retrieving public PEP from PEPhub

Open nsheff opened this issue 1 year ago • 5 comments
trafficstars

I entered a registry path to a public PEP in my looper config.

I ran looper run and I get this error:

looper run -d -l 1 
Looper version: 2.0.0a1
Command: run
Using looper config (.looper.yaml).
Traceback (most recent call last):
  File "/home/nsheff/.local/bin/looper", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/nsheff/.local/lib/python3.12/site-packages/looper/cli_pydantic.py", line 352, in main
    return run_looper(args, parser, test_args=test_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nsheff/.local/lib/python3.12/site-packages/looper/cli_pydantic.py", line 221, in run_looper
    project_dict=PEPHubClient()._load_raw_pep(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/typing_extensions.py", line 2673, in wrapper
    return arg(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/nsheff/.local/lib/python3.12/site-packages/pephubclient/pephubclient.py", line 272, in _load_raw_pep
    return self.load_raw_pep(registry_path, query_param)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nsheff/.local/lib/python3.12/site-packages/pephubclient/pephubclient.py", line 290, in load_raw_pep
    pephub_response = self.send_request(
                      ^^^^^^^^^^^^^^^^^^
  File "/home/nsheff/.local/lib/python3.12/site-packages/pephubclient/helpers.py", line 56, in send_request
    raise ResponseError("JWT has expired. Please log in again.")
pephubclient.exceptions.ResponseError: JWT has expired. Please log in again.

It seems to me it should not error that my JWT has expired if I'm trying to do something that shouldn't need a JWT in the first place.

I'm not sure if this is a bug in looper, or PEPHubClient, or what.

nsheff avatar Aug 22 '24 19:08 nsheff