question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gooey and Python2

See original GitHub issue

Hey,

i am using Arch Linux with python version 2.7 and Gooey version 1.0.0 and it does not work. Your example codes are running for python 3 but unfortunately not with python2 even if wxpython is installed. The following is the error message that i get if i try to run your example codes with python2:

usr/lib/python2.7/site-packages/wx-3.0-gtk3/wx/_core.py:16629:
 UserWarning: wxPython/wxWidgets release number mismatch
  warnings.warn("wxPython/wxWidgets release number mismatch")
Traceback (most recent call last):
  File "../annonex2embl/scripts/annonex2embl_GUI_Gooey.py", line 152, in <module>
    main()
  File "/usr/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/python_bindings/gooey_decorator.py", line 83, in inner2
    return payload(*args, **kwargs)
  File "../annonex2embl/scripts/annonex2embl_GUI_Gooey.py", line 143, in main
    args = parser.parse_args()
  File "/usr/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/python_bindings/gooey_decorator.py", line 78, in run_gooey
    application.run(build_spec)
  File "/usr/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/gui/application.py", line 15, in run
    app = build_app(build_spec)
  File "/usr/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/gui/application.py", line 24, in build_app
    gapp = GooeyApplication(merge(build_spec, imagesPaths))
  File "/usr/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/gui/containers/application.py", line 39, in __init__
    self.header = FrameHeader(self, buildSpec)
  File "/usr/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/gui/components/header.py", line 33, in __init__
    self.layoutComponent()
  File "/usr/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/gui/components/header.py", line 60, in layoutComponent
    self.settings_img = self._load_image(images['configIcon'], targetHeight)
  File "/usr/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/gui/components/header.py", line 92, in _load_image
    return imageutil.wrapBitmap(sizedImage, self)
  File "/usr/lib/python2.7/site-packages/Gooey-1.0.0-py2.7.egg/gooey/gui/imageutil.py", line 23, in wrapBitmap
    bitmapData = wx.Bitmap.FromBufferRGBA(im.size[0], im.size[1], im.convert('RGBA').tobytes())
AttributeError: type object 'Bitmap' has no attribute FromBufferRGBA

Thank you for helping me. ^_^

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
rinka-meltironcommented, Jun 20, 2018

OK. The problem is fixed with the following code modification: in file gooey/gui/imageutil.py line 28.

Please change the line: bitmapData = wx.Bitmap.FromBufferRGBA(im.size[0], im.size[1], rgba) to bitmapData = wx.BitmapFromBufferRGBA(im.size[0], im.size[1], rgba)

0reactions
chriskiehlcommented, Sep 16, 2018

@rinka-meltiron thanks for root causing this!

I’ve applied your patch. https://github.com/chriskiehl/Gooey/commit/9ab9b910d71d569dae58d86a6e5d739518133744 it’ll be in the next release.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gooey: turn a Python 2 or 3 console program into a GUI ...
Gooey converts your Console Applications into end-user-friendly GUI applications. It lets you focus on building robust, configurable programs in ...
Read more >
chriskiehl/Gooey - GitHub
Gooey is attached to your code via a simple decorator on whichever method has your argparse declarations. ... At run-time, it parses your...
Read more >
Gooey - PyPI
Gooey 1.0.8.1 · Project description · Turn (almost) any Python Console Program into a GUI application with one line · Quick Start ·...
Read more >
Understanding Python: Lesson 40 - Gooey (GUI) - YouTube
Learn how to create an awesome GUI in Python using Gooey and GooeyParser. Check out the PyPI page at https://pypi.org/project/ Gooey / and...
Read more >
Gooey python behaviour when launched from another file
I'm using python 2.7.9 and the gooey version available at https://github.com/chriskiehl/Gooey. The issue is that the parser works fine on ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found