AttributeError: 'CSS' object has no attribute 'bind'
See original GitHub issueExpected Behavior
It would just nicely run like the examples
Current Behavior
Traceback (most recent call last):
File "...\AppData\Local\Programs\Python\Python36-32\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "...\AppData\Local\Programs\Python\Python36-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "...\main.py", line 24, in <module>
main().main_loop()
File "...\AppData\Local\Programs\Python\Python36-32\lib\site-packages\toga_winforms\app.py", line 49, in main_loop
self._startup()
File "...\AppData\Local\Programs\Python\Python36-32\lib\site-packages\toga_winforms\app.py", line 41, in _startup
self.startup()
File "...\AppData\Local\Programs\Python\Python36-32\lib\site-packages\toga\interface\app.py", line 144, in startup
self.main_window.content = self._startup_method(self)
File "...\main.py", line 9, in build
box = toga.Box()
File "...\AppData\Local\Programs\Python\Python36-32\lib\site-packages\toga_winforms\widgets\box.py", line 10, in __init__
super().__init__(id=id, style=style, children=children)
File "...\AppData\Local\Programs\Python\Python36-32\lib\site-packages\toga\interface\widgets\box.py", line 21, in __init__
super().__init__(id=id, style=style, children=children)
File "...\AppData\Local\Programs\Python\Python36-32\lib\site-packages\toga\interface\widgets\base.py", line 144, in __init__
self.style = CSS()
File "...\AppData\Local\Programs\Python\Python36-32\lib\site-packages\toga\interface\widgets\base.py", line 170, in style
self._style = value.bind(self)
AttributeError: 'CSS' object has no attribute 'bind'
Steps to reproduce
- Run the very first example
Your Environment
global enviornment
-
Python Version 3.6.4
-
Operating System and Version
- macOS - version:
- Linux - distro: - version:
- Windows - version: 7
- Other - name: - version:
-
Toga Target
- android
- cocoa
- django
- gtk
- iOS
- tvOS
- watchOS
- winforms
- win32
- Other (please specify)
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
AttributeError: 'NoneType' object has no attribute 'bind'
I want to ask you about the error "AttributeError: 'NoneType' object has no attribute 'bind'". It is showing up when I write the...
Read more >object has no attribute 'bind' : r/kivy - Reddit
Rectangle is a graphics instruction, it needs to be drawn on a canvas, but you are currently using it like a widget. FloatLayout:...
Read more >I want to make a calculator in tkinter with .bind but there comes
I want to make a calculator in tkinter with .bind but there comes: AttributeError: 'NoneType' object has no attribute 'bind'.
Read more >Attribute Binding | JET Developer Cookbook - Oracle
This demo shows how to use these two styles of attribute data binding with native label and input elements and JET oj-label and...
Read more >AttributeError("'str' object has no attribute 'read'") - SyntaxFix
This error is caused when you tried to run a method within a string. String has a few methods, but not the one...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The partial workaround of @erwindewolf worked for me:
And everything runs just fine. Luckily I don’t have other dependencies with
colosseum
.It looks like you’re possibly running an old tutorial for the 0.2 branch of code. That branch didn’t work well on Windows; the 0.3 branch has much better support.
Can you confirm:
pip install toga
orpip install --pre toga
?(For the record - the latter is the version that will work on Windows)