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

Still blank on modern python librarys #173

Open
decryptedchaos opened this issue Aug 27, 2023 · 9 comments
Open

Still blank on modern python librarys #173

decryptedchaos opened this issue Aug 27, 2023 · 9 comments

Comments

@decryptedchaos
Copy link

decryptedchaos commented Aug 27, 2023

This has already been brought up back in 2022 here #164 and #136

I found none of the discussed workarounds viaable.. I really wanted vaping to work as a simpler alternative to smokeping (rrdtool alignment sucks)

But after a day of messing with it and trying to pin library versions which debian gets mad at you for doing anyway.. i just could not get it to work with a resonable amount of effort.. i'd have to completely change all my python librarys to older/newer versions to work and thats just not resonable to me..

I would have hoped this would have been solved since 2022, but with that said this does seam to be a small team project so thats understandable..

Well there you go, i suggest this remain open or something opened in its place because this is still very much a big issue.

@grizz
Copy link
Member

grizz commented Aug 28, 2023

@decryptedchaos Sorry to hear you've had issues, both issues listed were different causes, but yeah, a blank graph is frustrating.

This is definitely overdue a dependencies update, which may fix your library issues. What libraries were causing problems?

Could you post your config and any error messages you got?

Thanks!

@grizz
Copy link
Member

grizz commented Aug 29, 2023

Just did an initial pass on updates with #174

@grizz
Copy link
Member

grizz commented Aug 29, 2023

Actually, it's looking like it might a js issue, could you check and see if you're getting a javascript error on the vaping page?

@decryptedchaos
Copy link
Author

Sorry for the late response, GitHub isn't doing a good job of notifying me of responses, I will look into the pr tomorrow and get back to you it's late here

@w4rum
Copy link

w4rum commented Sep 22, 2023

I believe I have the same issue:

Screenshots

image

image

I get the following error in the JS console:

Uncaught TypeError: this.d3.data.selectAll(...).data(...).enter is not a function
    render_data http://localhost:7021/static/graphsrv/js/graphsrv.js:1465
    render_dynamic http://localhost:7021/static/graphsrv/js/graphsrv.js:1356
    Base http://localhost:7021/static/graphsrv/js/graphsrv.js:869
    jQuery 2
        dispatch
        handle
[graphsrv.js:1465:10](http://localhost:7021/static/graphsrv/js/graphsrv.js)

image

Same issue on Firefox and Chrome.

@decryptedchaos
Copy link
Author

decryptedchaos commented Sep 28, 2023

Yea there were definitely JS errors like that, I just haven't had time to test it anymore I kinda got mad at it and removed it and I've been distro hopping lately so might test on this one soon

@jamespo
Copy link

jamespo commented Oct 18, 2023

I also get blank pages, in the console all I get are warnings like:

The script from “http://yourdomain.coml:7121/graph/?targets=all&id=auto-2&fit=yes&type=multitarget&config=multitarget&source=latency.distant” was loaded even though its MIME type (“text/html”) is not a valid JavaScript MIME type.

These don't seem to be fatal though. This is in a virtualenv on debian 12 (python 3.11).

@pppwaw
Copy link

pppwaw commented May 24, 2024

When blank, I got this response from api:

{"meta": {"error": "module 'inspect' has no attribute 'getargspec'"}, "data": []}

After search, I think that it comes from the 42 line of vodka/data/renderers.py:

class RPC(DataRenderer):

    """
    RPC renderer, renders an rpc response containing meta and data objects

    Should be used as a decorator. The decorated function will be called
    with the data container as first argument and the meta container referenced
    in the "meta" keyword argument.
    """

    def __init__(self, type="json", data_type=list, errors=False):
        super().__init__(type=type)
        self.errors = errors
        self.data_type = data_type

    def __call__(self, fn):
        def wrapped(*args, **kwargs):
            resp = {"meta": {}, "data": self.data_type()}
            try:
                i_args = inspect.getargspec(fn)
                if i_args.args and i_args.args[0] == "self":
                    fn(args[0], resp["data"], meta=resp["meta"], *args, **kwargs)
                else:
                    fn(resp["data"], meta=resp["meta"], *args, **kwargs)
            except Exception as inst:
                if self.errors:
                    resp["meta"]["error"] = str(inst)
                else:
                    raise
            return self.render(resp)

        wrapped.__name__ = fn.__name__
        return wrapped

@pppwaw
Copy link

pppwaw commented May 24, 2024

I sent a PR to fix this: 20c/vodka#23

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

No branches or pull requests

5 participants