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

ValueError: Duplicated timeseries in CollectorRegistry: {'total_memory_usage'} #151

Open
aaktaev opened this issue Oct 11, 2022 · 1 comment
Labels

Comments

@aaktaev
Copy link

aaktaev commented Oct 11, 2022

  1. Run :
jupyter notebook --ResourceUseDisplay.enable_prometheus_metrics=False --ResourceUseDisplay.track_cpu_percent=True --NotebookApp.quit_button=False --NotebookApp.default_url="/lab"
  1. See error
12:50:30 notebook.1 | [W 12:50:30.817 NotebookApp] Error loading server extension nbresuse
12:50:30 notebook.1 |     Traceback (most recent call last):
12:50:30 notebook.1 |       File "/usr/local/lib/python3.10/dist-packages/notebook/notebookapp.py", line 2028, in init_server_extensions
12:50:30 notebook.1 |         func(self)
12:50:30 notebook.1 |       File "/usr/local/lib/python3.10/dist-packages/nbresuse/__init__.py", line 49, in load_jupyter_server_extension
12:50:30 notebook.1 |         PrometheusHandler(PSUtilMetricsLoader(nbapp)), 1000
12:50:30 notebook.1 |       File "/usr/local/lib/python3.10/dist-packages/nbresuse/prometheus.py", line 25, in __init__
12:50:30 notebook.1 |         gauge = Gauge(phrase, "counter for " + phrase.replace("_", " "), [])
12:50:30 notebook.1 |       File "/usr/local/lib/python3.10/dist-packages/prometheus_client/metrics.py", line 365, in __init__
12:50:30 notebook.1 |         super().__init__(
12:50:30 notebook.1 |       File "/usr/local/lib/python3.10/dist-packages/prometheus_client/metrics.py", line 143, in __init__
12:50:30 notebook.1 |         registry.register(self)
12:50:30 notebook.1 |       File "/usr/local/lib/python3.10/dist-packages/prometheus_client/registry.py", line 43, in register
12:50:30 notebook.1 |         raise ValueError(
12:50:30 notebook.1 |     ValueError: Duplicated timeseries in CollectorRegistry: {'total_memory_usage'}

It runs OK, but I need to get rid of this error.

Expected behavior

Context

  • Operating System and version: ubuntu2004
  • Browser and version: Google Chrome
  • Jupyter Server version:
jupyter                       1.0.0
jupyter-client                7.3.4
jupyter-console               6.4.0
jupyter-core                  4.11.1
jupyter-dash                  0.4.2
jupyter-packaging             0.11.1
jupyter-resource-usage        0.6.1
jupyter-server                1.18.1
jupyter-server-mathjax        0.2.6
jupyter-server-proxy          3.2.1
jupyterlab                    3.4.4
jupyterlab-dash               0.1.0a3
jupyterlab-git                0.37.1
jupyterlab-pygments           0.2.2
jupyterlab-server             2.15.0
jupyterlab-system-monitor     0.8.0
jupyterlab-topbar             0.6.1
jupyterlab-widgets            1.1.1
nbresuse                      0.4.0
Config dir: /usr/etc/jupyter
    gmaps enabled
    - Validating gmaps...
      gmaps 0.9.0 OK
    jupyter_server_proxy enabled
    - Validating jupyter_server_proxy...
      jupyter_server_proxy  OK
    jupyter_resource_usage enabled
    - Validating jupyter_resource_usage...
      jupyter_resource_usage 0.6.1 OK
    jupyter_server_mathjax enabled
    - Validating jupyter_server_mathjax...
      jupyter_server_mathjax  OK
    jupyterlab-system-monitor enabled
    - Validating jupyterlab-system-monitor...
      jupyterlab-system-monitor 0.8.0 OK
    jupyterlab-topbar enabled
    - Validating jupyterlab-topbar...
      jupyterlab-topbar 0.6.1 OK
    jupyterlab enabled
    - Validating jupyterlab...
      jupyterlab 3.4.4 OK
    jupyterlab_git enabled
    - Validating jupyterlab_git...
      jupyterlab_git 0.37.1 OK
    jupyterlab_plotly enabled
    - Validating jupyterlab_plotly...
      jupyterlab_plotly  OK
    jupyterlab_pygments enabled
    - Validating jupyterlab_pygments...
      jupyterlab_pygments 0.2.2 OK
    jupyterlab_widgets enabled
    - Validating jupyterlab_widgets...
      jupyterlab_widgets 1.1.1 OK
    nbclassic enabled
    - Validating nbclassic...
      nbclassic 0.4.3 OK
    nbdime enabled
    - Validating nbdime...
      nbdime 3.1.1 OK
    notebook_shim enabled
    - Validating notebook_shim...
      notebook_shim  OK
      ```
@aaktaev aaktaev added the bug label Oct 11, 2022
@welcome
Copy link

welcome bot commented Oct 11, 2022

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

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

No branches or pull requests

1 participant