Problem in using QxTransformer

10 views
Skip to first unread message

Oliver Friedrich

unread,
Apr 21, 2010, 7:59:26 AM4/21/10
to QxTransformer
Hi,

i want to give qcl and qxtransformer a try in my current application.
If i try to build the "hello world" example, all works fine. But if i
try to use qcl and include the qxtransformer trunk into my project i
get the following error:

[..]
============================================================================
EXECUTING: TRANSFORM
============================================================================
>>> Initializing cache...
>>> Executing shell command "/usr/bin/python contrib/QxTransformer/trunk/tool/bin/qxtransformer.py --dir source/class --out source/class -v 'main:INFO;dev:INFO;' -D 'dialect.json'"...
[INFO] - Your project directory: /home/oliver/workspace/Demo
[INFO] - QxTransformer directory: /home/oliver/workspace/Demo/contrib/
QxTransformer/trunk/tool/bin
[INFO] - Processing directory /home/oliver/workspace/Demo/source/class
[INFO] - Processing file /home/oliver/workspace/Demo/source/class/demo/
Application.xml
[ERROR] - 'lxml.etree._ElementTree' object has no attribute 'get'
>>> Done

On my arch linux is python 2.6.5 with lxml and libxml2 2.7.7
installed. Or is it an configuration problem of my project? I have
changed the configuration as in the qcl + qxtransformer example on
qooxdoo.org.

TIA,
Oliver

--
You received this message because you are subscribed to the Google Groups "QxTransformer" group.
To post to this group, send email to qxtran...@googlegroups.com.
To unsubscribe from this group, send email to qxtransforme...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/qxtransformer?hl=en.

Christian Boulanger

unread,
Apr 21, 2010, 9:01:43 AM4/21/10
to qxtran...@googlegroups.com
Hi Oliver,

Siarhei might have an idea about the lxml problem ... but: as much as I am happy you want to try out the qcl contrib, I currently have to warn you: it is changing by the minute since I am developing it alongside an application, for which it is the basis. So I cannot really recommend it to use it at this very moment but instead would like to ask you to wait until I release a version with a stable API (which take a few more weeks, however). qxtransformer, in contrast, is stable and has been working perfectly for me, we just need more documentation before we release the next version.

Cheers,
Christian 



2010/4/21 Oliver Friedrich <oli...@familie-friedrich.de>

Oliver Friedrich

unread,
Apr 21, 2010, 9:31:23 AM4/21/10
to QxTransformer
Hi Christian,
unfortunately i haven't some more weeks to start with the gui. Do you
have a plan which parts of qcl will change?

Cheers,

Christian Boulanger

unread,
Apr 21, 2010, 9:48:46 AM4/21/10
to qxtran...@googlegroups.com
Hello Oliver,

mainly the backend. The frontend (qcl javascript library) should be ok, and If I know someone is using it, i can try to be extra-careful not to break things. The frontend consists of very few classes anyways because I have put code into separate contribs (Dialog, VirtualData).

That said, the changes will concern mainly "under the hood"-things, so if you're ok with using only the top-level API (for example, the data model API), then you should be ok:


Let me know whether that is of interest to you.

Please note, however, that the tutorial


is badly out of date and will not work. I am currently trying to finish a project and therefore will not be able to update it. But you can have a look at the code of the project itself to see how it uses qxtransformer and qcl:


Cheers,
Christian 



2010/4/21 Oliver Friedrich <oli...@familie-friedrich.de>
Hi Christian,

Siarhei Barysiuk

unread,
Apr 21, 2010, 9:54:11 AM4/21/10
to qxtran...@googlegroups.com
Hi,

Could you please change QXT_VERBOSE parameter in your app config.json to

"QXT_VERBOSE": "main:DEBUG;dev:INFO;"

and send me a stack trace?

Thanks,
Serge

Oliver Friedrich

unread,
Apr 21, 2010, 10:19:17 AM4/21/10
to QxTransformer
Hi Serge,
here it comes. If you need more info send me a message.

============================================================================
EXECUTING: TRANSFORM
============================================================================
>>> Initializing cache...
>>> Executing shell command "/usr/bin/python contrib/QxTransformer/trunk/tool/bin/qxtransformer.py --dir source/class --out source/class -v 'main:DEBUG;dev:INFO;' -D 'dialect.json'"...
[INFO] - Your project directory: /home/oliver/workspace/Demo
[INFO] - QxTransformer directory: /home/oliver/workspace/Demo/contrib/
QxTransformer/trunk/tool/bin
[INFO] - Processing directory /home/oliver/workspace/Demo/source/class
[DEBUG] - Getting processor with dialect configuration dialect.json.
[INFO] - Processing file /home/oliver/workspace/Demo/source/class/demo/
Application.xml
[ERROR] - 'lxml.etree._ElementTree' object has no attribute 'get'
[DEBUG] - Error details: Traceback (most recent call last):
File "contrib/QxTransformer/trunk/tool/bin/qxtransformer.py", line
200, in main
__processDir__(dirPath,options)
File "contrib/QxTransformer/trunk/tool/bin/qxtransformer.py", line
100, in __processDir__
result = p.transform(path)
File "/home/oliver/workspace/Demo/contrib/QxTransformer/trunk/tool/
pylib/qxt/transformer/processor.py", line 67, in transform
self.__componentLookup__.lookup(nsmap)
File "/home/oliver/workspace/Demo/contrib/QxTransformer/trunk/tool/
pylib/qxt/transformer/component.py", line 52, in lookup
tagConfig.extendWithComponents(configs)
File "/home/oliver/workspace/Demo/contrib/QxTransformer/trunk/tool/
pylib/qxt/settings/settings.py", line 386, in extendWithComponents
normalizedTagName = utils.XMLUtils.normalize(component.get('tag'))
AttributeError: 'lxml.etree._ElementTree' object has no attribute
'get'



On Apr 21, 3:54 pm, Siarhei Barysiuk <s.barys...@gmail.com> wrote:
> Hi,
>
> Could you please change QXT_VERBOSE parameter in your app config.json to
>
> "QXT_VERBOSE": "main:DEBUG;dev:INFO;"
>
> and send me a stack trace?
>
> Thanks,
> Serge
>

Siarhei Barysiuk

unread,
Apr 21, 2010, 10:53:14 AM4/21/10
to qxtran...@googlegroups.com
Oliver,

Also, please attach your Application.xml. I'll take a look into this.

Thanks,
Serge

On Apr 21, 2010, at 5:19 PM, Oliver Friedrich wrote:

> Hi Serge,
> here it comes. If you need more info send me a message.
>
> =
> =
> =
> =
> =
> =
> ======================================================================
> EXECUTING: TRANSFORM
> =
> =
> =
> =
> =
> =
> ======================================================================
>>>> Initializing cache...
>>>> Executing shell command "/usr/bin/python contrib/QxTransformer/
>>>> trunk/tool/bin/qxtransformer.py --dir source/class --out source/

Oliver Friedrich

unread,
Apr 21, 2010, 11:17:41 AM4/21/10
to qxtran...@googlegroups.com
Hi Serge,

it's exactly like the example app from Christian, just modified the app
namespace. Footer and body components are stripped down to a composite /
hbox combination.


Application.xml:

> <?xml version="1.0" encoding="utf-8"?>
> <qx:application
> xmlns:qx="http://www.qxtransformer.org/qooxdoo"
> xmlns:qxt="http://www.qxtransformer.org/extension"
> xmlns:qcl="http://www.qooxdoo.org/contrib/qcl/trunk"
> xmlns:components="demo.components.*"
> className="demo.Application"
> author="Oliver Friedrich"
> extend="demo.Main">
>
>
> <!-- main layout -->
>
> <qcl:loginDialog
> image="access/qooxdoo-logo.gif"
> widgetId="loginDialog"
> callback="{js}this.checkLogin"
> message="Please log in."
> text="qcl demo application"
> />
>
> <qx:composite qxt:edge="0">
> <qx:vbox>
>
> <!-- menu -->
>
>
> <!-- toolbar -->
> <!--<components:toolBar/>-->
>
> <qx:composite margin="30">
> <qx:vbox spacing="10">
>
> <!-- application body -->
> <components:body/>
>
> <!-- source code buttons -->
> <components:footer/>
>
> </qx:vbox>
> </qx:composite>
>
> </qx:vbox>
> </qx:composite>
> </qx:application>Thanks for

Footer.xml and Body.xml (just different in the class name):

> <?xml version="1.0" encoding="utf-8"?>
> <qxt:component
> xmlns:qx="http://www.qxtransformer.org/qooxdoo"
> xmlns:qxt="http://www.qxtransformer.org/extension"
> xmlns:qcl="http://www.qooxdoo.org/contrib/qcl/trunk"
> author=""
> className="demo.components.Footer"
> tagName="footer">
>
> <qx:composite margin="30">
> <qx:vbox>
>
>
> </qx:vbox>
> </qx:composite>
>
> </qxt:component>


I hope, that i haven't build an error into these realy simple XML files ;)

Cheers,
Oliver

>>>>> contrib/QxTransformer/trunk/tool/bin/qxtransformer.py --dir
>>>>> source/class --out source/class -v 'main:DEBUG;dev:INFO;' -D

signature.asc

Oliver Friedrich

unread,
Apr 21, 2010, 11:37:26 AM4/21/10
to QxTransformer
Hi Christian,

First i was interested in the access control functions and the
integration in both the front and back end. The active record would be
interesting, too. If you say, this is near to stable, i will use it.
If there will be minor changes in the future, this should not be a big
task to fix my app.

I will have a look into the sources of your project this evening or
tomorrow.

Cheers,
Oliver


On Apr 21, 3:48 pm, Christian Boulanger
<c.boulan...@qxtransformer.org> wrote:
> Hello Oliver,
>
> mainly the backend. The frontend (qcl javascript library) should be ok, and
> If I know someone is using it, i can try to be extra-careful not to break
> things. The frontend consists of very few classes anyways because I have put
> code into separate contribs (Dialog, VirtualData).
>
> That said, the changes will concern mainly "under the hood"-things, so if
> you're ok with using only the top-level API (for example, the data model
> API), then you should be ok:
>
> http://qooxdoo.org/contrib/project/qcl/active_record
>
> <http://qooxdoo.org/contrib/project/qcl/active_record>Let me know whether
> that is of interest to you.
>
> Please note, however, that the tutorial
>
> http://qooxdoo.org/contrib/project/qcl/tutorial_application
>
> <http://qooxdoo.org/contrib/project/qcl/tutorial_application>is badly out of
> date and will not work. I am currently trying to finish a project and
> therefore will not be able to update it. But you can have a look at the code
> of the project itself to see how it uses qxtransformer and qcl:
>
> https://bibliograph.svn.sourceforge.net/svnroot/bibliograph/bibliogra...
>
> Cheers,
> Christian
>
> 2010/4/21 Oliver Friedrich <oli...@familie-friedrich.de>
>
>
>
> > Hi Christian,
> > unfortunately i haven't some more weeks to start with the gui. Do you
> > have a plan which parts of qcl will change?
>
> > Cheers,
> > Oliver
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "QxTransformer" group.
> > To post to this group, send email to qxtran...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > qxtransforme...@googlegroups.com<qxtransformer%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/qxtransformer?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "QxTransformer" group.
> To post to this group, send email to qxtran...@googlegroups.com.
> To unsubscribe from this group, send email to qxtransforme...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/qxtransformer?hl=en.

Oliver Friedrich

unread,
Apr 22, 2010, 4:43:00 AM4/22/10
to qxtran...@googlegroups.com
Hi Serge,

have played a little with my project and the Application.xml...

If i remove the attribute

xmlns:components="demo.components.*"

from tag <qx:aplication> the lxml error is gone, but (as expected) the
components are missing so the transform also fails.

In a second try i have removed the Application.xml completly from the
project. QxTransformer now creates the JS-files in the
components-subdir. So these files should be ok.

Perhaps i should open a new discussion about it, but it is normal that
QxTransformer creates redundant code for setting the properties of an
element?

Example:
> var qxMenuButton2 = new qx.ui.menu.Button("Note sheet", "icon/16/mimetypes/audio-x-generic.png", null, null);
> qxMenuButton2.setLabel("Note sheet");
> qxMenuButton2.setIcon("icon/16/mimetypes/audio-x-generic.png");


Cheers,
Oliver

Am 21.04.2010 16:53, schrieb Siarhei Barysiuk:

>>>>> contrib/QxTransformer/trunk/tool/bin/qxtransformer.py --dir
>>>>> source/class --out source/class -v 'main:DEBUG;dev:INFO;' -D

--
Oliver Friedrich

Hammerschmidtstr. 39 | oli...@familie-friedrich.de
50999 Köln-Sürth | http://familie-friedrich.de
fon +49.(0)2236.5093052 | Skype: o.friedrich
fax +49.(0)2264.286479 | ICQ: 33857371

Secure Mail via PGP Signing & Encryption (Info: www.gnupg.org)
PGP ID: 0x5FBEE7EC

signature.asc

Siarhei Barysiuk

unread,
Apr 22, 2010, 5:42:22 AM4/22/10
to qxtran...@googlegroups.com
Hi Oliver,

I've prepared a demo which uses components, it works fine on my end
with qxt (trunk) + qooxdoo (trunk). My configuration:

Mac OS X 10.5.8
python 2.5.2
libxml2 2.6.32_1

Could you please try it on your side and let me know if you get the
same error.

Thanks,
Serge

P.S. Regarding redundant code, I'll take a look into this today/
tomorrow. Thanks for letting me know.


On Apr 22, 2010, at 11:43 AM, Oliver Friedrich wrote:

> Hi Serge,
>

Siarhei Barysiuk

unread,
Apr 22, 2010, 5:44:37 AM4/22/10
to qxtran...@googlegroups.com
Sorry, forgot to attach demo app. You can find it attached.

demo.zip

Oliver Friedrich

unread,
Apr 22, 2010, 6:29:05 AM4/22/10
to qxtran...@googlegroups.com
Hi Serge,

i have changed the paths in the config to the correct locations
(attached you find the config.json) and than i get the same error as in
my project. It's qxt trunk and qooxdoo 1.0.1.

My system:
Arch linux (32bit), all packages up to date
Python 2.6.5
python-lxml 2.2.5
libxml2 2.7.7

If there is a incompatibility between the software versions on my system
and required by QxTransformer i can try to install manually another
version of python and libxml2 if available. There is also python 2.4.6
available in arch linux, but this seems to be too old. There come syntax
errors.

But would be fine if qxt would work out of the box or if i would know
the error, that causes the problem.


Output of transform:
> [oliver@Eligius demo]$ ./generate.py transform
>
> ============================================================================
> INITIALIZING: DEMO
> ============================================================================
>>>> Configuration: config.json
>>>> Jobs: transform
>>>> Resolving config includes...
>>>> Resolving jobs...
>>>> Incorporating job defaults...
>>>> Resolving macros...
>>>> Resolving libs/manifests...
>
> ============================================================================
> EXECUTING: TRANSFORM
> ============================================================================
>>>> Initializing cache...
>>>> Executing shell command "/usr/bin/python ../ROBASheets/contrib/QxTransformer/trunk/tool/bin/qxtransformer.py --dir source/class --out source/class -v 'main:INFO;dev:INFO;' -D 'dialect.json'"...
> [INFO] - Your project directory: /home/oliver/workspace/demo
> [INFO] - QxTransformer directory: /home/oliver/workspace/ROBASheets/contrib/QxTransformer/trunk/tool/bin
> [INFO] - Processing directory /home/oliver/workspace/demo/source/class
> [INFO] - Processing file /home/oliver/workspace/demo/source/class/demo/Application.xml
> [ERROR] - 'lxml.etree._ElementTree' object has no attribute 'get'
>>>> Done
> [oliver@Eligius demo]$


Cheers,
Oliver


Am 22.04.2010 11:42, schrieb Siarhei Barysiuk:
> Hi Oliver,
>
> I've prepared a demo which uses components, it works fine on my end with
> qxt (trunk) + qooxdoo (trunk). My configuration:
>
> Mac OS X 10.5.8
> python 2.5.2
> libxml2 2.6.32_1
>
> Could you please try it on your side and let me know if you get the same
> error.
>
> Thanks,
> Serge
>
> P.S. Regarding redundant code, I'll take a look into this
> today/tomorrow. Thanks for letting me know.
config.json

Oliver Friedrich

unread,
Apr 26, 2010, 8:17:36 AM4/26/10
to qxtran...@googlegroups.com
Hi,

a few minutes ago there was an update for my lxml package available.
after the upgrade your demo app could be transformed. There was just the
Footer.xml missing, but who cares?

So it seems not to be an error in QxTransformer but in lxml (now updated
to lxml 2.2.6.

Will now try my own project again.


Thanks,
Oliver


Am 22.04.2010 11:44, schrieb Siarhei Barysiuk:
> Sorry, forgot to attach demo app. You can find it attached.
>
>
>
>
> Serge

Siarhei Barysiuk

unread,
Apr 26, 2010, 8:39:34 AM4/26/10
to qxtran...@googlegroups.com
Hi,

Great you resolved this. You can find Footer.xml in demo/components
folder.

Serge

Oliver Friedrich

unread,
Apr 26, 2010, 10:15:50 AM4/26/10
to qxtran...@googlegroups.com
Hi Serge,

for just the testing the transformation of the demo app i don't need the
Footer... have removed the tag from Application.xml and "./generate
transform" does its job ...

After finding a mixing of namespace declarations between the
Application.xml and the components files my project transforms, too.
I hope, this was all.

Now i can start to define my interface with Qxt.

Cheers,
Oliver
>>>>>> To post to this group, send email to qxtran...@googlegroups.com.
>>>>>> To unsubscribe from this group, send email to
>>>>>> qxtransforme...@googlegroups.com.
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/qxtransformer?hl=en.
>>>>>>
>>>>>
>>>>

Siarhei Barysiuk

unread,
Apr 26, 2010, 10:20:14 AM4/26/10
to qxtran...@googlegroups.com
Great! Let me know if you have any other questions.

Serge
>>>>>>> EXECUTING: TRANSFORM
>>>>>>> =
>>>>>>> =
>>>>>>> =
>>>>>>> =
>>>>>>> =
>>>>>>> =
>>>>>>> =
>>>>>>> =
>>>>>>> =
>>>>>>> =
>>>>>>> =
>>>>>>> =
>>>>>>> ================================================================
>>>>>>>
Reply all
Reply to author
Forward
0 new messages