Comments (10)
Your code looks just like this?
import argparse
from gooey import Gooey
@Gooey
def main():
parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('integers', metavar='N', type=int, nargs='+',
help='an integer for the accumulator')
parser.add_argument('--sum', dest='accumulate', action='store_const',
const=sum, default=max,
help='sum the integers (default: find the max)')
args = parser.parse_args()
print args.accumulate(args.integers)
if __name__ == '__main__':
main()
If so, I'm not quite sure what's wrong. I've never tested Gooey on a linux box. Are you able to run any of the examples in the mockapplications directory?
from gooey.
Hi,
Yep I'm able to run the mockapp.py example (same venv, same interpreter).
from gooey.
Ok so I was able to run the argparse example without the nargs='+'
argument.
Values '?', '+' throw the error above whereas values like 1, 2, N are ok.
This snippet works :
import argparse
from gooey import Gooey
@Gooey
def main():
parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('integers', metavar='N', type=int, nargs=2,
help='an integer for the accumulator')
parser.add_argument('--sum', dest='accumulate', action='store_const',
const=sum, default=max,
help='sum the integers (default: find the max)')
args = parser.parse_args()
print args.accumulate(args.integers)
if __name__ == '__main__':
main()
It may be something related to the 'nargs' support ?
Hope this helps,
Thx
from gooey.
Helpful, indeed! I must have missed the ?
and +
operators.
I'll take a look at it tonight.
from gooey.
Same problem here as well, it seems nargs with ? or + operators brings forward the same errors as Djiit.
from gooey.
I made a couple of changes. Can you guys do a fresh pull and let me know if you're still experiencing the same issue?
Thanks!
from gooey.
Fresh pulled and ran fine on Windows, tried my Linux (Ubuntu 12.04.3) and received the same error as before (below). Tried playing around for a bit, but haven't found where the bug is. I'll play around with the code later on tonight and see if I can't come up with anything.
Traceback (most recent call last):
File "mock_argparse_example.py", line 19, in <module>
main()
File "/home/kriss/.local/lib/python2.7/site-packages/Gooey-0.1.0-py2.7.egg/gooey/gooey_decorator.py", line 97, in inner
frame = BaseWindow(BodyPanel, client_app, params)
File "/home/kriss/.local/lib/python2.7/site-packages/Gooey-0.1.0-py2.7.egg/gooey/gui/base_window.py", line 44, in __init__
self._init_components(BodyPanel)
File "/home/kriss/.local/lib/python2.7/site-packages/Gooey-0.1.0-py2.7.egg/gooey/gui/base_window.py", line 68, in _init_components
self.config_panel = BodyPanel(self)
File "/home/kriss/.local/lib/python2.7/site-packages/Gooey-0.1.0-py2.7.egg/gooey/gui/advanced_config.py", line 38, in __init__
self._do_layout()
File "/home/kriss/.local/lib/python2.7/site-packages/Gooey-0.1.0-py2.7.egg/gooey/gui/advanced_config.py", line 59, in _do_layout
self.AddWidgets(container, self.components.required_args, add_space=True)
File "/home/kriss/.local/lib/python2.7/site-packages/Gooey-0.1.0-py2.7.egg/gooey/gui/advanced_config.py", line 79, in AddWidgets
widget_group = component.Build(parent=self)
File "/home/kriss/.local/lib/python2.7/site-packages/Gooey-0.1.0-py2.7.egg/gooey/gui/components.py", line 38, in Build
self._msg = self.CreateHelpMsgWidget(parent, self._action)
File "/home/kriss/.local/lib/python2.7/site-packages/Gooey-0.1.0-py2.7.egg/gooey/gui/components.py", line 67, in CreateHelpMsgWidget
base_text.SetLabelText(base_text.GetLabelText() + self.CreateNargsMsg(action))
AttributeError: 'StaticText' object has no attribute 'SetLabelText'
from gooey.
Hmm.. Weird. I'll have to install Ubuntu and do some exploring.
from gooey.
same on linux mint, if it s different on windows and linux it should be a bug in wx
from gooey.
Couple of quirks have been smoothed out on the Linux side or things. I'm can successfully run Gooey under Ubuntu without issue. Do you want to pull a fresh copy and try it on your Mint system?
from gooey.
Related Issues (20)
- problem with pyinstaller. 'NoneType' object has no attribute 'isatty' HOT 1
- program_name missed while launching gooeyparser
- Gooey 1.0.8.1 Validation Not Working HOT 2
- Question: Can a script decorated with gooey be invoked without gooey? HOT 1
- Gooey outputs characters after completion "[0m" HOT 3
- `increment` field in `Slider` widget not working HOT 3
- Problem with "colored" library for richtext-control HOT 4
- Is there a way to retain global state upon "Edit" (i.e going back to the first screen and running script again)
- DecimalField: "Field is required" message despite entering a number HOT 4
- Python 3.12 release on pypi (and preferrably also on conda-forge)
- Tabbed output tab title is not rendered properly on tabs other than first
- ModuleNotFoundError: No module named 'rewx' HOT 1
- Mutually exclusive option groups behave strangely when given default values
- args cases
- Gooey freezing and not showing simple print statements HOT 1
- Click CLI support HOT 2
- Script name gets mangled when installed as a console script on Windows HOT 4
- Gooey Crashes - Segmentation Fault on MacOS when exiting
- the second MultiFileChooser get only one file HOT 1
- Project abandoned by originator? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gooey.