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

Web viewers errors #400

Open
DanicaSTFC opened this issue May 14, 2024 · 0 comments
Open

Web viewers errors #400

DanicaSTFC opened this issue May 14, 2024 · 0 comments

Comments

@DanicaSTFC
Copy link
Collaborator

When executing the web viewer, and then uploading an image, it outputs the following errors and many more

  out.append(scaling * ((val - xmin) / dx))
Traceback (most recent call last):
  runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
runpy.py", line 87, in _run_code
    exec(code, run_globals)
  cilviewer_webapp\Scripts\web_cilviewer.exe\__main__.py", line 7, in <module>
ccpi\web_viewer\web_app.py", line 96, in main
    TRAME_VIEWER.start()
  ccpi\web_viewer\trame_viewer.py", line 94, in start
    server.start()
site-packages\trame_server\core.py", line 653, in start
    task = CoreServer.server_start(
site-packages\trame_server\protocol.py", line 50, in server_start
    return server.start_webserver(
site-packages\wslink\server.py", line 295, in start_webserver
    return exec_modes[exec_mode]()
site-packages\wslink\server.py", line 278, in main_exec
    loop.run_until_complete(create_coroutine())
cilviewer_webapp\lib\asyncio\base_events.py", line 642, in run_until_complete
    return future.result()
ite-packages\wslink\backends\aiohttp\__init__.py", line 114, in start
    port_callback(self.get_port())
site-packages\trame_server\protocol.py", line 93, in port_callback
    self.server.state.ready()
site-packages\trame_server\state.py", line 73, in ready
    self.flush()
site-packages\trame_server\state.py", line 246, in flush
    coroutine = callback(**self._pushed_state)
site-packages\ccpi\web_viewer\web_app.py", line 125, in change_model
    TRAME_VIEWER.load_file(kwargs['file_name'], kwargs.get('opacity', "scalar"))
site-packages\ccpi\web_viewer\trame_viewer3D.py", line 323, in load_file
    self.update_windowing_defaults(windowing_method)
site-packages\ccpi\web_viewer\trame_viewer3D.py", line 288, in update_windowing_defaults
    self.update_slice_data()
 \ccpi\web_viewer\trame_viewer.py", line 302, in update_slice_data
    self.slice_level_default = self.convert_value_to_percentage(self.cil_viewer.getSliceColorLevel())
  \ccpi\web_viewer\trame_viewer.py", line 414, in convert_value_to_percentage
    percentage = 100 * (value - self.cmin) / (self.cmax + self.cmin)
ZeroDivisionError: float division by zero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant