Skip to content

Errors about 'Optional' is not defined running fish_config #12053

Closed

Description

@toxicbubble

Arch Linux install with Alacritty terminal

Fish version = 4.2.0
System python version = python3.13

Running a fresh environment did not help.

The output in the terminal is multiple copies of this error output:

Exception occurred during processing of request from ('::ffff:127.0.0.1', 56980, 0, 0)
Traceback (most recent call last):
  File "/usr/lib/python3.13/socketserver.py", line 697, in process_request_thread
    self.finish_request(request, client_address)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/socketserver.py", line 362, in finish_request
    self.RequestHandlerClass(request, client_address, self)
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/http/server.py", line 672, in __init__
    super().__init__(*args, **kwargs)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/socketserver.py", line 766, in __init__
    self.handle()
    ~~~~~~~~~~~^^
  File "/usr/lib/python3.13/http/server.py", line 436, in handle
    self.handle_one_request()
    ~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/http/server.py", line 424, in handle_one_request
    method()
    ~~~~~~^^
  File "/tmp/fish-data.VPqs7G/tools/web_config/webconfig.py", line 1201, in do_GET
    curcolors, curinfo = self.do_get_colors()
                         ~~~~~~~~~~~~~~~~~~^^
  File "/tmp/fish-data.VPqs7G/tools/web_config/webconfig.py", line 866, in do_get_colors
    data.update(parse_color(color_value))
                ~~~~~~~~~~~^^^^^^^^^^^^^
  File "/tmp/fish-data.VPqs7G/tools/web_config/webconfig.py", line 244, in parse_color
    current_best: str, i: int, long_opt: str, short_opt: Optional[str]
                                                         ^^^^^^^^
NameError: name 'Optional' is not defined
----------------------------------------

There webserver does seem to start and does open the browser page, but cannot select any themes etc. as those elements don't load correctly.

Seems related to this change #12039 not being happy on this environment somehow. Seems to be the line 244 which is now showing as current_best: str, i: int, long_opt: str, short_opt: Optional[str] and that isn't working with this setup. Maybe because it uses Optional[str] instead of typing.Optional[str] and Optional isn't imported?

Activity

  1. added this to the fish 4.2.1 milestone on Nov 12, 2025
  2. added a commit that references this issue on Nov 12, 2025
    1c9d4e7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions