Wednesday, October 27, 2021

[SOLVED] qooxdoo and debian lenny

Issue

Hy,

Trying to use qooxdoo with debian lenny. qooxdoo sdk 1.2

create-application.py ok but I've got a problem with generate.py :

/demo/qooxdoo/hello1$ ./generate.py source-all
Traceback (most recent call last):
  File "/demo/qooxdoo-1.2-sdk/tool/bin/generator.py", line 26, in <module>
    from generator.Generator import Generator
  File "/demo/qooxdoo-1.2-sdk/tool/bin/Generator.py", line 31, in <module>
    #import warnings
  File "/demo/qooxdoo-1.2-sdk/tool/bin/Generator.py", line 31, in <module>
    #import warnings
ImportError: No module named code.Class

I do think I'm missing some debian packages

Do please help me. Ta.


Solution

This stack trace is a tad weird. For a basic thing, the referenced code line (Generator.py:31) imports from "generator.code.Class", and the ImportError indicates that it doesn't find the "code" subpackage under "generator". But the "#import warnings" line is actually generator.py line 31, as if it would be mixing generator.py and Generator.py.

This is furthered by the fact that the stack trace references /demo/qooxdoo-1.2-sdk/tool/bin/Generator.py, which should really be /demo/qooxdoo-1.2-sdk/tool/pylib/generator/Generator.py

I don't have a lenny handy to check if the package itself is alright, but I get the feeling there is some basic flaw with how the qooxdoo SDK is installed on your machine.

I recommend that you simply download the qooxdoo-1.2-sdk from sourceforge and unpack it to a suitable directory. Then re-run the create-application.py from this package to create a new skeleton, or edit the config.json of your existing skeleton so that the QOOXDOO_PATH macro points to the new SDK. Then you should be all set.



Answered By - ThomasH