scientific-python / repo-review

Framework that can run checks on repos
https://repo-review.readthedocs.io
BSD 3-Clause "New" or "Revised" License
62 stars 3 forks source link

Webapp seem broken ? #208

Closed Carreau closed 4 months ago

Carreau commented 4 months ago

Using the example of scikit-hep/hist

https://scientific-python.github.io/repo-review/?repo=scikit-hep%2Fhist&branch=main

I get

Traceback (most recent call last):
  File "/lib/python311.zip/_pyodide/_base.py", line 468, in eval_code
    .run(globals, locals)
     ^^^^^^^^^^^^^^^^^^^^
  File "/lib/python311.zip/_pyodide/_base.py", line 310, in run
    coroutine = eval(self.code, globals, locals)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "", line 5, in 
  File "", line 7, in __init__
  File "/lib/python3.11/site-packages/repo_review/ghpath.py", line 59, in __post_init__
    val: io.StringIO = self.open_url(url)
                       ^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/repo_review/ghpath.py", line 53, in open_url
    with urllib.request.urlopen(url) as response:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python311.zip/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python311.zip/urllib/request.py", line 519, in open
    response = self._open(req, data)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python311.zip/urllib/request.py", line 541, in _open
    return self._call_chain(self.handle_open, 'unknown',
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python311.zip/urllib/request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/lib/python311.zip/urllib/request.py", line 1419, in unknown_open
    raise URLError('unknown url type: %s' % type)
urllib.error.URLError: 

Edit: works from the CLI, so unsure.

henryiii commented 4 months ago

Same is happening here: https://scientific-python.github.io/repo-review/?repo=scikit-hep%2Fhist&branch=main - not sure what changed, but it's not picking up the injection of open_url. The next version modifies this a bit in https://github.com/scientific-python/repo-review/pull/206, but that's not out yet, so no idea why it's broken yet.

henryiii commented 4 months ago

Actually, I understand why the local demo is broken - it expects the unreleased version of repo-review. Ahh, your link is the unreleased version too! That's why. I thought you were pointing at the dev guide. Probably should just make a release, then.

henryiii commented 4 months ago

0.11 is out which fixes this.

Carreau commented 4 months ago

Ah, sorry ! thanks for the quick fix !