chesterli29 / jupyterlab_tensorboard

Tensorboard extension for jupyterlab.
MIT License
315 stars 36 forks source link

Launcher Error Invalid response: 500 Internal Server Error #17

Open ghltshubh opened 4 years ago

ghltshubh commented 4 years ago

I am running jupyter lab on a server and accessing it via tunneling. I have installed everything the environment but getting

Launcher Error
Invalid response: 500 Internal Server Error

Error log:

[E 01:47:34.366 LabApp] Uncaught exception POST /api/tensorboard?1574837254333 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:9000', method='POST', uri='/api/tensorboard?1574837254333', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/home/5sg/anaconda3/envs/pt/lib/python3.6/site-packages/tornado/web.py", line 1697, in _execute
        result = method(*self.path_args, **self.path_kwargs)
      File "/home/5sg/anaconda3/envs/pt/lib/python3.6/site-packages/tornado/web.py", line 3174, in wrapper
        return method(self, *args, **kwargs)
      File "/home/5sg/anaconda3/envs/pt/lib/python3.6/site-packages/jupyter_tensorboard/api_handlers.py", line 40, in post
        .new_instance(data["logdir"], reload_interval=reload_interval)
      File "/home/5sg/anaconda3/envs/pt/lib/python3.6/site-packages/jupyter_tensorboard/tensorboard_manager.py", line 148, in new_instance
        purge_orphaned_data=purge_orphaned_data)
      File "/home/5sg/anaconda3/envs/pt/lib/python3.6/site-packages/jupyter_tensorboard/tensorboard_manager.py", line 46, in create_tb_app
        tensorboard.assets_zip_provider)
      File "/home/5sg/anaconda3/envs/pt/lib/python3.6/site-packages/tensorboard/backend/application.py", line 157, in standard_tensorboard_wsgi
        flags, plugin_loaders, data_provider, assets_zip_provider, multiplexer)
      File "/home/5sg/anaconda3/envs/pt/lib/python3.6/site-packages/jupyter_tensorboard/tensorboard_manager.py", line 113, in TensorBoardWSGIApp
        path_to_run = application.parse_event_files_spec(logdir)
      File "/home/5sg/anaconda3/envs/pt/lib/python3.6/site-packages/tensorboard/backend/application.py", line 455, in parse_event_files_spec
        for specification in logdir_spec.split(','):
    AttributeError: 'Namespace' object has no attribute 'split'
[W 01:47:34.367 LabApp] Unhandled error
[E 01:47:34.368 LabApp] {
      "Host": "localhost:9000",
      "Connection": "keep-alive",
      "Content-Length": "22",
      "Authorization": "token 401f2b8e783e2a50aec2e64c05e9b2a5cf8c1b8d0a8e5ed7",
      "Origin": "http://localhost:9000",
      "X-Xsrftoken": "2|fffa844f|42f6c3eccfa21538c79fd36d886881ab|1572963744",
      "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36",
      "Dnt": "1",
      "Content-Type": "application/json",
      "Accept": "*/*",
      "Sec-Fetch-Site": "same-origin",
      "Sec-Fetch-Mode": "cors",
      "Referer": "http://localhost:9000/lab",
      "Accept-Encoding": "gzip, deflate, br",
      "Accept-Language": "en-US,en;q=0.9,hi;q=0.8",
      "Cookie": "_xsrf=2|fffa844f|42f6c3eccfa21538c79fd36d886881ab|1572963744; username-localhost-9999=\"2|1:0|10:1574832035|23:username-localhost-9999|44:MWY0NTNhNWY2NGYyNDYxYzg4MWMzNWVkZmFkN2NkNzE=|4767ddaf8d441d2a597605b6775ebb7a7792ed49759859e50a0281d49916bb67\"; username-localhost-9000=\"2|1:0|10:1574837254|23:username-localhost-9000|44:NjE0NWFjZWEwNTNmNDkzNmJiMTk5NDhkZmRhYTI3ZDA=|e1158687cdf8477d06336d5058bf6ebb104a6cbf19ed078b66707ceae7bf0e2c\""
    }
[E 01:47:34.368 LabApp] 500 POST /api/tensorboard?1574837254333 (127.0.0.1) 4.88ms referer=http://localhost:9000/lab
Done with AddRunsFromDirectory: /home/5sg/notebooks
TensorBoard reload process: Reload the whole Multiplexer
Beginning EventMultiplexer.Reload()
Reloading runs serially (one after another) on the main thread.
Finished with EventMultiplexer.Reload()
TensorBoard done reloading. Load took 0.004 secs
TensorBoard reload process beginning
Starting AddRunsFromDirectory: /home/5sg/notebooks
GetLogdirSubdirectories: Starting to list directories via walking.
Done with AddRunsFromDirectory: /home/5sg/notebooks
TensorBoard reload process: Reload the whole Multiplexer
Beginning EventMultiplexer.Reload()
Reloading runs serially (one after another) on the main thread.
Finished with EventMultiplexer.Reload()
TensorBoard done reloading. Load took 0.001 secs
TensorBoard reload process beginning
Starting AddRunsFromDirectory: /home/5sg/notebooks
GetLogdirSubdirectories: Starting to list directories via walking.
Done with AddRunsFromDirectory: /home/5sg/notebooks
TensorBoard reload process: Reload the whole Multiplexer
Beginning EventMultiplexer.Reload()
Reloading runs serially (one after another) on the main thread.
Finished with EventMultiplexer.Reload()
TensorBoard done reloading. Load took 0.001 secs
rjafarau commented 4 years ago

The same issue

ruralscenery commented 4 years ago

500 Internal Server Error

Traceback (most recent call last):↵ File "/opt/conda/lib/python3.7/site-packages/tornado/web.py", line 1701, in _execute↵
result = method(*self.path_args, *self.path_kwargs)↵
File "/opt/conda/lib/python3.7/site-packages/tornado/web.py", line 3178, in wrapper↵
return method(self,
args, **kwargs)↵
File "/opt/conda/lib/python3.7/site-packages/jupyter_tensorboard/api_handlers.py", line 40, in post↵
.new_instance(data["logdir"], reload_interval=reload_interval)↵
File "/opt/conda/lib/python3.7/site-packages/jupyter_tensorboard/tensorboard_manager.py", line 221, in new_instance↵
purge_orphaned_data=purge_orphaned_data)↵
File "/opt/conda/lib/python3.7/site-packages/jupyter_tensorboard/tensorboard_manager.py", line 47, in create_tb_app↵
tensorboard.assets_zip_provider)↵
File "/opt/conda/lib/python3.7/site-packages/tensorboard/backend/application.py", line 147, in standard_tensorboard_wsgi↵
flags, plugin_loaders, data_provider, assets_zip_provider, multiplexer↵
File "/opt/conda/lib/python3.7/site-packages/jupyter_tensorboard/tensorboard_manager.py", line 165, in TensorBoardWSGIApp_2x↵
window_title=flags.window_title)↵ TypeError: init() got an unexpected keyword argument 'db_connection_provider'↵"

octavd commented 4 years ago

Hello,

I can confirm i have the same error -> 500 Internal Server Error if using jupyter-tensorboard==0.2.0


Traceback (most recent call last):
--
  | File "/opt/app-root/lib/python3.6/site-packages/tornado/web.py", line 1701, in _execute
  | result = method(*self.path_args, **self.path_kwargs)
  | File "/opt/app-root/lib/python3.6/site-packages/tornado/web.py", line 3178, in wrapper
  | return method(self, *args, **kwargs)
  | File "/opt/app-root/lib/python3.6/site-packages/jupyter_tensorboard/api_handlers.py", line 40, in post
  | .new_instance(data["logdir"], reload_interval=reload_interval)
  | File "/opt/app-root/lib/python3.6/site-packages/jupyter_tensorboard/tensorboard_manager.py", line 221, in new_instance
  | purge_orphaned_data=purge_orphaned_data)
  | File "/opt/app-root/lib/python3.6/site-packages/jupyter_tensorboard/tensorboard_manager.py", line 47, in create_tb_app
  | tensorboard.assets_zip_provider)
  | File "/opt/app-root/lib/python3.6/site-packages/tensorboard/backend/application.py", line 147, in standard_tensorboard_wsgi
  | flags, plugin_loaders, data_provider, assets_zip_provider, multiplexer
  | File "/opt/app-root/lib/python3.6/site-packages/jupyter_tensorboard/tensorboard_manager.py", line 165, in TensorBoardWSGIApp_2x
  | window_title=flags.window_title)
  | TypeError: __init__() got an unexpected keyword argument 'db_connection_provider'

And if using jupyter-tensorboard==0.1.10 we have the following

Traceback (most recent call last):
--
  | File "/opt/app-root/lib/python3.6/site-packages/tornado/web.py", line 1701, in _execute
  | result = method(*self.path_args, **self.path_kwargs)
  | File "/opt/app-root/lib/python3.6/site-packages/tornado/web.py", line 3178, in wrapper
  | return method(self, *args, **kwargs)
  | File "/opt/app-root/lib/python3.6/site-packages/jupyter_tensorboard/api_handlers.py", line 40, in post
  | .new_instance(data["logdir"], reload_interval=reload_interval)
  | File "/opt/app-root/lib/python3.6/site-packages/jupyter_tensorboard/tensorboard_manager.py", line 148, in new_instance
  | purge_orphaned_data=purge_orphaned_data)
  | File "/opt/app-root/lib/python3.6/site-packages/jupyter_tensorboard/tensorboard_manager.py", line 46, in create_tb_app
  | tensorboard.assets_zip_provider)
  | File "/opt/app-root/lib/python3.6/site-packages/tensorboard/backend/application.py", line 147, in standard_tensorboard_wsgi
  | flags, plugin_loaders, data_provider, assets_zip_provider, multiplexer
  | File "/opt/app-root/lib/python3.6/site-packages/jupyter_tensorboard/tensorboard_manager.py", line 113, in TensorBoardWSGIApp
  | path_to_run = application.parse_event_files_spec(logdir)
  | File "/opt/app-root/lib/python3.6/site-packages/tensorboard/backend/application.py", line 625, in parse_event_files_spec
  | for specification in logdir_spec.split(","):
  | AttributeError: 'Namespace' object has no attribute 'split'

Could you please advise? :)

octavd commented 4 years ago

I've found a solution to make it work. I was missing from pip -> tensorboard

Here you can find the requirements:

tensorflow==2.1.0
jupyter-tensorboard==0.2.0
tensorflow-estimator==2.1.0
tensorboard==2.1.0

And for jupyter:

jupyter-client         6.1.3      
jupyter-core           4.6.3      
jupyter-kernel-gateway 2.4.0      
jupyter-telemetry      0.1.0      
jupyter-tensorboard    0.2.0      
jupyterhub             1.1.0      
jupyterlab             2.1.4         
jupyterlab-server      1.1.5    

After adding the missing req it worked like a charm. :)

LukeAI commented 4 years ago

thanks for posting solution @octavd I had same problem, this sorted it.

seareale commented 3 years ago

I've found a solution to make it work. I was missing from pip -> tensorboard

Here you can find the requirements:

tensorflow==2.1.0
jupyter-tensorboard==0.2.0
tensorflow-estimator==2.1.0
tensorboard==2.1.0

And for jupyter:

jupyter-client         6.1.3      
jupyter-core           4.6.3      
jupyter-kernel-gateway 2.4.0      
jupyter-telemetry      0.1.0      
jupyter-tensorboard    0.2.0      
jupyterhub             1.1.0      
jupyterlab             2.1.4         
jupyterlab-server      1.1.5    

After adding the missing req it worked like a charm. :)

thanks for your solution @octavd