unhandled exception when expanding 'Categories'

Create issue
Issue #10 closed
macxcool created an issue

I'm on Archlinux 64bit with everything up-to-date. When I launch pkgbrowser and then click to expand the 'Categories' I get:

Traceback (most recent call last): File "/usr/lib/pkgbrowser/pkgbrowser/backend.py", line 543, in _call_async return _call(args) File "/usr/lib/pkgbrowser/pkgbrowser/backend.py", line 539, in _call return getattr(backend, args[0])(*args[1:]) File "/usr/lib/pkgbrowser/pkgbrowser/backend.py", line 1027, in _list_categories data = self._fetch_categories(PACNET_CAT) File "/usr/lib/pkgbrowser/pkgbrowser/backend.py", line 1059, in _fetch_categories if exception is not None: UnboundLocalError: local variable 'exception' referenced before assignment

Comments (16)

  1. kachelaqa repo owner

    The pacnet server that supplies the categories is down. There is a small bug in pkgbrowser that means it doesn't show the correct error message, but fixing that won't really change anything.

  2. macxcool reporter

    Oh. I didn't realize that's what was happening in the background. Go ahead and close this then. It's not really a bug. Thanks for the explanation.

  3. eiji7@cryptolab.net

    Hey, @kachelaqa. Will this server be back or listing categories will not be supported? Is there any temporary solution for categories feature (like cached info in offline mode)?

  4. kachelaqa repo owner

    (1) I don't know. (2) No. The categories listing uses pacnet, which was created by trojkat (Tomasz Karbownicki), and runs on his server. The original forum thread announcing pacnet is here: https://bbs.archlinux.org/viewtopic.php?id=44933.

    It doesn't look like he's been active for quite some time, but you could try pinging him to see what his future plans are for pacnet (if any).

  5. macxcool reporter

    Do we have any idea how he did it? Can the functionality be replicated? It was awfully nice when it was working.

  6. eiji7@cryptolab.net

    Good job @kachelaqa! In one article there is link for Github repo with code of pacnet server! So it's possible to run this code in your own server and then change urls in application to your own domain. Note: we need a hosting/server that supports Python. It looks like that original pacnet was hosted in PHP version and then it was hosted for free by MegiTeam (that was started in 2009). Please let me know if you need a translation from any Polish article. I can translate it for you.

  7. eiji7@cryptolab.net

    I'm not Python developer (I learned Python in few hours), but

    The pacnet server that supplies the categories is down. There is a small bug in pkgbrowser that means it doesn't show the correct error message, but fixing that won't really change anything."

    I got this message:

    Could not fetch url: http://pacnet.karbownicki.com/api/categories/

    [Errno 113] Brak trasy do hosta

    (no route to host) after comment just few lines.

    exception = None # for me it's it's line 1052
    # ...
    try: # for me it's line 1055
    # ...
    except NetworkError as exception:
    if exception is not None:
        raise exception
    # for me there are lines: 1057-1060

    and by fixing indention for: return Downloader.download([url]).get(url) - in source that I have installed in my Manjaro it's 4 spaces indention to remove at line 1056.

  8. kachelaqa repo owner

    Let me be clear right away: there no chance at all of me getting involved in restoring the pacnet service. I never use it myself, so have no motivation for spending any time on it.

    At some point in the near future, I will temporarily remove the categories from pkgbrowser. Then if someone decides to take on the job of restoring the pacnet service, I will update pkgbrowser to make use of it.

  9. eiji7@cryptolab.net

    @kachelaqa: oh, that's bad. Is there any other tool that allows to browse packages by category in Arch/Manjaro?

  10. kachelaqa repo owner

    If there are, they probably also use(d) pacnet, since that seems to be the only service of its kind for arch linux. Did you try contacting Tomasz Karbownicki? If he knows people were actively using the service, maybe he'd consider restoring it.

  11. Log in to comment