pepkit / looper

A job submitter for Portable Encapsulated Projects
http://looper.databio.org
BSD 2-Clause "Simplified" License
20 stars 7 forks source link

Looper - pephub is broken #453

Closed nsheff closed 4 months ago

nsheff commented 4 months ago

When I run the hello world example on how to use looper with PEPhub, I get this error:

looper run
Looper version: 1.7.0
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.8/site-packages/looper/cli_looper.py", line 684, in main
    project_dict=PEPHubClient()._load_raw_pep(
  File "/home/nsheff/.local/lib/python3.8/site-packages/pephubclient/pephubclient.py", line 345, in _load_raw_pep
    correct_proj_dict = ProjectDict(**json.loads(decoded_response))
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
nsheff commented 4 months ago

I am wondering if this is related to:

Either way, we need to

  1. fix the problem
  2. make this error message more clear about what is happening, in case this happens again in the future. As in, if it's something like the server is not working, it should say "couldn't connect to the server" or if the API appears to no longer be compatible, it could say "couldn't get record from PEPhub API at URL: https://xyz... "
khoroshevskyi commented 4 months ago

I think this issue is outdated, you should use pephubclient version >0.3.0

nsheff commented 4 months ago

updating to pephubclient 0.4.0 and the error went away. thanks.

nsheff commented 4 months ago

probably should change this: https://github.com/pepkit/looper/blob/1468956dde66abf5b853c80eaeaee2d411bfad64/requirements/requirements-all.txt#L7