Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to run pyjamas-desktop on my Fedora 15. All packages were installed, I have adjusted PYTHONPATH to include /usr/share/pyjamas/library, but when I try to run a simple example:

from pyjamas.ui.Button import Button
from pyjamas.ui.RootPanel import RootPanel
from pyjamas.ui.HTML import HTML
from pyjamas import Window

def greet(sender):
    Window.alert("Hello, AJAX!")

if __name__ == '__main__':
    b = Button("Click me", greet)
    hw = HTML("Hello <b>World</b>")

I get information:

Traceback (most recent call last):
  File "pyjstest.py", line 10, in <module>
    b = Button("Click me", greet)
  File "/usr/share/pyjamas/library/pyjamas/ui/Button.py", line 36, in __init__
    element = DOM.createButton()
  File "/usr/share/pyjamas/library/pyjamas/DOM.py", line 190, in createButton
    return createElement("button")
  File "/usr/share/pyjamas/library/pyjamas/DOM.py", line 202, in createElement
    return doc().createElement(tag)
  File "/usr/share/pyjamas/library/__pyjamas__.py", line 45, in doc
    return main_frame.getDomDocument() 
AttributeError: 'NoneType' object has no attribute 'getDomDocument'

Do I need to adjust something here? For Ubuntu I have found information on pyjamas-dev, that it needs to be built from source and bootstrapped. Nothing was required of me, when I installed it from package in Fedora. What may I be doing wrong?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.