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

Error: cannot compare instances of NoneType #56

Open
jeertmans opened this issue Aug 22, 2023 · 0 comments
Open

Error: cannot compare instances of NoneType #56

jeertmans opened this issue Aug 22, 2023 · 0 comments

Comments

@jeertmans
Copy link

jeertmans commented Aug 22, 2023

Hello!

When trying to add a TUI to my program, see jeertmans/manim-slides#249, the TUI crashes on two subcommands: present and wizard. The crash occurs when loading the subcommand's documentation, not actually running it.
FYI, both commands launch some GUI with PySide6.

I have attached the full error traceback below. As it is quite long and not very easy to understand, I was hoping to get some help here :-)

Thanks!

───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /home/eertmans/.cache/pypoetry/virtualenvs/manim-slides-M-PeeMP--py3.10/lib/ │
│ python3.10/site-packages/trogon/trogon.py:171 in update_command_data         │
│                                                                              │
│   168 │   @on(CommandForm.Changed)                                           │
│   169 │   def update_command_data(self, event: CommandForm.Changed) -> None: │
│   170 │   │   self.command_data = event.command_data                         │
│ ❱ 171 │   │   self._update_execution_string_preview(                         │
│   172 │   │   │   self.selected_command_schema, self.command_data            │
│   173 │   │   )                                                              │
│   174                                                                        │
│                                                                              │
│ ╭───────── locals ─────────╮                                                 │
│ │ event = Changed()        │                                                 │
│ │  self = CommandBuilder() │                                                 │
│ ╰──────────────────────────╯                                                 │
│                                                                              │
│ /home/eertmans/.cache/pypoetry/virtualenvs/manim-slides-M-PeeMP--py3.10/lib/ │
│ python3.10/site-packages/trogon/trogon.py:193 in                             │
│ _update_execution_string_preview                                             │
│                                                                              │
│   190 │   │   │   │   "command-name-syntax"                                  │
│   191 │   │   │   )                                                          │
│   192 │   │   │   prefix = Text(f"{self.click_app_name} ", command_name_synt │
│ ❱ 193 │   │   │   new_value = command_data.to_cli_string(include_root_comman │
│   194 │   │   │   highlighted_new_value = Text.assemble(prefix, self.highlig │
│   195 │   │   │   prompt_style = self.get_component_rich_style("prompt")     │
│   196 │   │   │   preview_string = Text.assemble(("$ ", prompt_style), highl │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │              command_data = UserCommandData(                             │ │
│ │                             │   name='root',                             │ │
│ │                             │   options=[                                │ │
│ │                             │   │   UserOptionData(                      │ │
│ │                             │   │   │   name=[                           │ │
│ │                             │   │   │   │   '--notify-outdated-version'  │ │
│ │                             │   │   │   ],                               │ │
│ │                             │   │   │   value=(True,),                   │ │
│ │                             │   │   │   option_schema=OptionSchema(      │ │
│ │                             │   │   │   │   name=[                       │ │
│ │                             │   │   │   │   │                            │ │

│ │     Discontinued because GitHub limits the length. See attached file.    │ │
[error.txt](https://github.com/Textualize/trogon/files/12407498/error.txt)


│ │                       │   │   │   },                                     │ │
│ │                       │   │   │   parent=None,                           │ │
│ │                       │   │   │   is_group=True                          │ │
│ │                       │   │   ),                                         │ │
│ │                       │   │   is_group=False                             │ │
│ │                       │   )                                              │ │
│ │                       )                                                  │ │
│ │          value_data = [('None',)]                                        │ │
│ │ values_are_defaults = True                                               │ │
│ │     values_supplied = True                                               │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────╯
TypeError: '<' not supported between instances of 'NoneType' and 'NoneType'

error.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant