jtpio/jupyterlab-system-monitor

mem limit weird bug str parsing

robomotic opened this issue · 3 comments

Hi there,
I am following the documentation but getting the error:

Executing the command: jupyter lab --LabApp.token= --NotebookApp.ResourceUseDisplay.mem_limit=16341940 --NotebookApp.ResourceUseDisplay.track_cpu_percent=True --NotebookApp.ResourceUseDisplay.cpu_limit=4
[I 15:56:30.857 LabApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret
[W 15:56:31.757 LabApp] All authentication is disabled.  Anyone who can connect to this server will be able to run code.
[I 15:56:33.180 LabApp] JupyterLab extension loaded from /opt/conda/lib/python3.8/site-packages/jupyterlab
[I 15:56:33.181 LabApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[W 15:56:33.188 LabApp] Error loading server extension nbresuse
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.8/site-packages/notebook/notebookapp.py", line 1945, in init_server_extensions
        func(self)
      File "/opt/conda/lib/python3.8/site-packages/nbresuse/__init__.py", line 35, in load_jupyter_server_extension
        resuseconfig = ResourceUseDisplay(parent=nbapp)
      File "/opt/conda/lib/python3.8/site-packages/traitlets/config/configurable.py", line 101, in __init__
        self.config = config
      File "/opt/conda/lib/python3.8/site-packages/traitlets/traitlets.py", line 604, in __set__
        self.set(obj, value)
      File "/opt/conda/lib/python3.8/site-packages/traitlets/traitlets.py", line 593, in set
        obj._notify_trait(self.name, old_value, new_value)
      File "/opt/conda/lib/python3.8/site-packages/traitlets/traitlets.py", line 1217, in _notify_trait
        self.notify_change(Bunch(
      File "/opt/conda/lib/python3.8/site-packages/traitlets/traitlets.py", line 1227, in notify_change
        return self._notify_observers(change)
      File "/opt/conda/lib/python3.8/site-packages/traitlets/traitlets.py", line 1264, in _notify_observers
        c(event)
      File "/opt/conda/lib/python3.8/site-packages/traitlets/traitlets.py", line 888, in compatible_observer
        return func(self, change)
      File "/opt/conda/lib/python3.8/site-packages/traitlets/config/configurable.py", line 205, in _config_changed
        self._load_config(change.new, traits=traits, section_names=section_names)
      File "/opt/conda/lib/python3.8/site-packages/traitlets/config/configurable.py", line 172, in _load_config
        setattr(self, name, deepcopy(config_value))
      File "/opt/conda/lib/python3.8/site-packages/traitlets/traitlets.py", line 604, in __set__
        self.set(obj, value)
      File "/opt/conda/lib/python3.8/site-packages/traitlets/traitlets.py", line 578, in set
        new_value = self._validate(obj, value)
      File "/opt/conda/lib/python3.8/site-packages/traitlets/traitlets.py", line 610, in _validate
        value = self.validate(obj, value)
      File "/opt/conda/lib/python3.8/site-packages/traitlets/traitlets.py", line 1980, in validate
        self.error(obj, value)
      File "/opt/conda/lib/python3.8/site-packages/traitlets/traitlets.py", line 690, in error
        raise TraitError(e)
    traitlets.traitlets.TraitError: The 'mem_limit' trait of a ResourceUseDisplay instance expected an int or a callable, not the str '16341940'.

The commandline shows that is indeed an integer unquoted, so I am not sure what is happening.

jtpio commented

Thanks @robomotic for reporting.

It sounds similar to jupyter-server/jupyter-resource-usage#86, and would probably have to be fixed in the jupyter-resource-usage repo.

jtpio commented

Closing as jupyterlab-system-monitor has now been integrated in jupyter-resource-usage: jupyter-server/jupyter-resource-usage#191

Let's continue in jupyter-server/jupyter-resource-usage#86.

Thanks!