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.

AttributeError: 'CSS' object has no attribute 'bind'

See original GitHub issue

Expected 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

  1. 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:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
julenlcommented, Aug 8, 2019

The partial workaround of @erwindewolf worked for me:

pip uninstall colosseum
pip install colosseum==0.1.6
python3 setup.py django -s

And everything runs just fine. Luckily I don’t have other dependencies with colosseum.

2reactions
freakboy3742commented, May 25, 2019

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:

  • Which version of the tutorial you are running (e.g., by providing a URL), and
  • Whether your installation of toga was pip install toga or pip install --pre toga?

(For the record - the latter is the version that will work on Windows)

Read more comments on GitHub >

github_iconTop 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 >

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