global name 'GLib2Reactor' is not defined
Question: I'm struggling to get some python code using the python-brisa framework to
work, the code is not written by me but should be straight forward.

    
    
        from brisa.core.reactors import install_default_reactor
    reactor = install_default_reactor()
    
    from brisa.core.threaded_call import run_async_function
    
    import xml.etree.ElementTree as ET
    
    from time import sleep
    
    import sys, os
    
    import sonos
    import knx
    

Howewer after installing the frameworks I get

    
    
    Traceback (most recent call last):
      File "knxsonos.py", line 24, in <module>
        reactor = install_default_reactor()
      File "/usr/local/lib/python2.7/dist-packages/brisa/core/reactors/__init__.py", line 14, in install_default_reactor
        return GLib2Reactor()
    NameError: global name 'GLib2Reactor' is not defined
    

I have been looking both stack overflow, and googling for days without finding
a solution.

Anyone??, help would be greatly appreciated...


Answer: Here's some possibilities:

  * **GLib2Reactor doesn't return anything** \- Then your code is wrong
  * **GLib2Reactor is not declared** \- try this: 

`x = GLib2Reactor()`  
`return x`

  * **GLib2Reactor has to be imported** \- just import it

**my best advice:** read the docs

