You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Gooey(
advanced=True,
group_by_type=True,
navigation="Tabbed",
optional_cols=2,
required_cols=1,
requires_shell=True,
show_sidebar=True,
sidebar_title="Actions",
suppress_gooey_flag=True,
tabbed_groups=True,
use_legacy_titles=False,
# (...)defget_parser():
common_parser=GooeyParser(add_help=False)
common_parser.add_argument(
"-i",
"--image",
required=True,
type=Union[Path, str],
dest="image",
metavar="Input image",
help="Path to the input image file",
widget="FileChooser",
gooey_options={
**STD_OPTIONS,
**{
"wildcard": "PNG Images|*.png|JPG Images|*.jpg|JPEG Images|*.jpeg",
"default_dir": str(get_pictures_folder()),
"message": "Choose an image",
"full_width": True,
},
},
)
common_settings_group=common_parser.add_argument_group("Preferences")
common_settings_group.add_argument(
"-O",
"--openai-api-key",
type=str,
dest="openai_api_key",
metavar="OpenAI API key",
help="Not needed if OPENAI_API_KEY environment variable is set",
gooey_options={
**STD_OPTIONS,
**{},
},
)
# (...)parser=GooeyParser(
prog="",
description="Perform iterative inpainting on an image file using OpenAI's DALL-E 2 model.",
)
subparsers=parser.add_subparsers(dest="command", help="commands")
inpaint_parser=subparsers.add_parser(
"inpaint",
help="Perform iterative inpainting on an image file",
parents=[common_parser],
)
inpaint_parser.add_argument(
"-o",
"--output",
type=Union[Path, str],
dest="output",
metavar="Output image",
help="Path to the output image file",
widget="FileSaver",
gooey_options={
**STD_OPTIONS,
**{
"wildcard": "PNG Images|*.png",
"default_dir": str(get_pictures_folder()),
"message": "Choose the image destination",
"full_width": True,
},
},
)
# (...)describe_parser=subparsers.add_parser(
"describe",
help="Describe the image",
parents=[common_parser],
)
returnparser
When I run the tool, I get the default layout for the inpaint command:
But when I choose the describe command, I also get the same content (and it shouldn't be so):
In Terminal, I get:
Traceback (most recent call last):
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/gooey/gui/application/application.py", line 264, in handleSelectAction
self.set_state(assoc(self.state, 'activeSelection', event.Selection))
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/rewx/core.py", line 273, in set_state
patch(self.base, self.render())
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/rewx/core.py", line 102, in patch
update(vdom, dom)
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/rewx/dispatch.py", line 26, in wrapper
return registry[element['type']](element, parent)
File "/Users/adam/Library/Python/3.10/lib/python/site-packages/rewx/widgets.py", line 110, in frame
frame.taskbarIcon = wx.adv.TaskBarIcon(iconType=wx.adv.TBI_DOCK)
wx._core.wxAssertionError: C++ assertion "!sm_dockIcon" failed at /Users/robind/projects/bb2/dist-osx-py310/build/ext/wxWidgets/src/osx/cocoa/taskbar.mm(251) in wxTaskBarIconDockImpl(): You should never have more than one dock icon!
The text was updated successfully, but these errors were encountered:
Hello There, Future Issue Creator!
In my code (full code is here) I have two subparsers:
When I run the tool, I get the default layout for the
inpaint
command:But when I choose the
describe
command, I also get the same content (and it shouldn't be so):In Terminal, I get:
The text was updated successfully, but these errors were encountered: