pybee / toga-demo

A demonstration of the capabilities of the Toga widget toolkit.
BSD 3-Clause "New" or "Revised" License
16 stars 9 forks source link

AttributeError on OSX 10.9.4 and Python 3.4.1 #2

Closed crolfe closed 10 years ago

crolfe commented 10 years ago

I get the following error when I try to run toga-demo using OSX 10.9.4 and Python 3.4 (no issues with Python 2.7.5):

(env)185:test colin$ toga-demo Traceback (most recent call last): File "/Users/colin/Programming/python/test/env/lib/python3.4/site-packages/toga/platform/cocoa/libs/objc.py", line 841, in hasproperty return self.properties[name] KeyError: b'initWithContentsOfFile'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/colin/Programming/python/test/env/bin/toga-demo", line 7, in from toga_demo.main import main File "/Users/colin/Programming/python/test/env/lib/python3.4/site-packages/toga_demo/main.py", line 8, in import toga File "/Users/colin/Programming/python/test/env/lib/python3.4/site-packages/toga/init.py", line 80, in from .platform.cocoa.app import File "/Users/colin/Programming/python/test/env/lib/python3.4/site-packages/toga/platform/cocoa/app.py", line 7, in from .widgets import Icon, TIBERIUS_ICON File "/Users/colin/Programming/python/test/env/lib/python3.4/site-packages/toga/platform/cocoa/widgets/init.py", line 5, in from .icon import File "/Users/colin/Programming/python/test/env/lib/python3.4/site-packages/toga/platform/cocoa/widgets/icon.py", line 32, in TIBERIUS_ICON = Icon('tiberius.icns', system=True) File "/Users/colin/Programming/python/test/env/lib/python3.4/site-packages/toga/platform/cocoa/widgets/icon.py", line 18, in init self.impl = NSImage.alloc().initWithContentsOfFile(get_NSString(filename)) File "/Users/colin/Programming/python/test/env/lib/python3.4/site-packages/toga/platform/cocoa/libs/objc.py", line 936, in getattr if self.objc_class.has_property(name): File "/Users/colin/Programming/python/test/env/lib/python3.4/site-packages/toga/platform/cocoa/libs/objc.py", line 843, in has_property selector = get_selector('set' + name[0].upper() + name[1:] + ':') AttributeError: 'int' object has no attribute 'upper'

freakboy3742 commented 10 years ago

This was an issue in the 0.1.0 of toga; it's subsequently been fixed. If you install from master, you should be able to run toga-demo under Py3.