Launching anaconda-navigator causes ZeroDivisionError

I have been using Anaconda Navigator for the last weeks without a hitch on a computer running Windows 10. This morning I was offered to update to the latest version, which I did.

When I try to launch the Anaconda Navigator app, the launcher freezes while “Loading applications…”:
Anaconda Navigator launcher freezes Loading applications_400px

I have opened the Anaconda prompt and executed anaconda-navigator, with the same result. This is the output on the command line:

2022-09-27 10:33:48,752 - ERROR __init__.global_exception_logger:19
integer division or modulo by zero
Traceback (most recent call last):
  File "C:\Users\mju\Anaconda3\lib\site-packages\anaconda_navigator\widgets\main_window\__init__.py", line 497, in setup
    self.post_setup(conda_data=output)
  File "C:\Users\mju\Anaconda3\lib\site-packages\anaconda_navigator\widgets\main_window\__init__.py", line 525, in post_setup
    self.tab_home.setup(conda_data)
  File "C:\Users\mju\Anaconda3\lib\site-packages\anaconda_navigator\widgets\tabs\home.py", line 253, in setup
    self.update_applications()
  File "C:\Users\mju\Anaconda3\lib\site-packages\anaconda_navigator\widgets\tabs\home.py", line 301, in update_applications
    self.list.addItem(ListItemApplication(prefix=self.current_prefix, **application_data))
  File "C:\Users\mju\Anaconda3\lib\site-packages\anaconda_navigator\widgets\lists\apps.py", line 202, in __init__
    icon_height //= self.pixmap.width()
ZeroDivisionError: integer division or modulo by zero

dear mju.

Thank you for your contribution to the anaconda community.

I think that the cause of this error can be confirmed from the python error code, but the cause is as follows.

File “C:\Users\mju\Anaconda3\lib\site-packages\anaconda_navigator\widgets\lists\apps.py”, line 202, in init
icon_height //= self.pixmap.width()

Was the icon data deleted or moved before the operation?

If an icon etc. is deleted due to wrong operation or disk error, this error will appear.

Best regards.

Hello @ktsh.tanaka.2020

As far as I remember, no icon was intentionally deleted. Reading the source code it is my understanding that the image file required should be located at
C:\Users\mju\Anaconda3\Lib\site-packages\anaconda_navigator\static\imagesanaconda-icon-256x256.png
That is the case. It is the icon visible in my screenshot.

dear nju.

thank you for your reply.

I’m not sure why, but it is. In an OS with many programs running, if the information to be read is not available in a given amount of time, the programs may throw an error.

In that case, I would appreciate it if you could take measures such as reading the data again without panicking.

If possible, it is recommended to use an SSD instead of an unstable HDD for data transfer. Especially on systems like Anaconda, loading the library takes a long time.

Best regards.

Hello @ktsh.tanaka.2020

What do you mean by “I’m not sure why, but it is”? What is?

What do you mean by “reading the data again without panicking”? Do you mean I should try to launch the application again? I have tried that over and over for a dozen times (and restarted my system in between), always with the same outcome.

I am using a SSD.

Hello @ktsh.tanaka.2020

I would appreciate if you could take a minute to reply at your earliest convenience.

Best regards