New to Amara2, getting some odd errors but mostly functional

6 views
Skip to first unread message

meppum

unread,
Aug 6, 2009, 1:40:33 PM8/6/09
to akara
I'm new to Amara2, but so far I like what I see. However, I'm getting
a few minor errors. I can work around them, but I thought I'd ask
about them anyway:

1. the following throws a "AttributeError: 'amara.tree.entity' object
has no attribute 'a'. I looks like amara.parse is not an alias for
amara.bindery.parse, though the docs say it is.

import amara
doc = amara.parse("<a>foo</a>")
print doc.a

2. the following throws a "AttributeError: 'module' object has no
attribute 'bindery'. There seems to be a bad import somewhere.

import amara
doc = amara.bindery.parse("<a>foo</a>")

3. the following throws a deprecation error in python 2.6

from amara import bindery


I used the easy_install method and it installed version 2.0a1. Should
I be using a different version?

Luis Miguel Morillas

unread,
Aug 6, 2009, 2:09:12 PM8/6/09
to ak...@googlegroups.com
2009/8/6 meppum <mme...@gmail.com>:
>
> I'm new to Amara2, but so far I like what I see. However, I'm getting
> a few minor errors. I can work around them, but I thought I'd ask
> about them anyway:
>

This doc can help you: http://wiki.xml3k.org/Amara2/QuickRef

> 1. the following throws a "AttributeError: 'amara.tree.entity' object
> has no attribute 'a'. I looks like amara.parse is not an alias for
> amara.bindery.parse, though the docs say it is.
>
> import amara
> doc = amara.parse("<a>foo</a>")
> print doc.a
>

from amara import bindery
doc = bindery.parse("<a>foo</a>")
print doc.a


> 2. the following throws a "AttributeError: 'module' object has no
> attribute 'bindery'. There seems to be a bad import somewhere.
>
> import amara
> doc = amara.bindery.parse("<a>foo</a>")
>
Do you have got an amara.py file in this directory?

Uche Ogbuji

unread,
Aug 6, 2009, 8:29:07 PM8/6/09
to ak...@googlegroups.com
Luis covered the first two.


On Thu, Aug 6, 2009 at 11:40 AM, meppum <mme...@gmail.com> wrote:

3. the following throws a deprecation error in python 2.6

from amara import bindery

I used the easy_install method and it installed version 2.0a1. Should
I be using a different version?

I'm sorry, but we're overdue for a release.  Please use the mercurial version for now.  I'm hoping for a release in a couple of weeks.  One of the things I'm working on to make that happen is a manual.

Side note: I'm writing the manual in reST, including material converted from http://wiki.xml3k.org/Amara2/QuickRef .  Can I say how much I dislike reST?  Does anyone know of an option that would allow  me to work in Moin dialect and have it converted to reST?  I did check the Web and the anwer seems to be "no" (except for the lossy option of moin -> XHTML -> reST).  I'm hoping someone knows of something I didn't find.


--
Uche Ogbuji                       http://uche.ogbuji.net
Founding Partner, Zepheira        http://zepheira.com
Linked-in profile: http://www.linkedin.com/in/ucheogbuji
Articles: http://uche.ogbuji.net/tech/publications/
Friendfeed: http://friendfeed.com/uche
Twitter: http://twitter.com/uogbuji
Join me at Balisage:
* http://www.balisage.net/

meppum

unread,
Aug 6, 2009, 10:04:17 PM8/6/09
to akara
Sorry, what's the mercurial version? A link would be helpful. Thanks.

On Aug 6, 8:29 pm, Uche Ogbuji <u...@ogbuji.net> wrote:
> Luis covered the first two.
>
> On Thu, Aug 6, 2009 at 11:40 AM, meppum <mmep...@gmail.com> wrote:
>
> > 3. the following throws a deprecation error in python 2.6
>
> > from amara import bindery
>
> > I used the easy_install method and it installed version 2.0a1. Should
> > I be using a different version?
>
> I'm sorry, but we're overdue for a release.  Please use the mercurial
> version for now.  I'm hoping for a release in a couple of weeks.  One of the
> things I'm working on to make that happen is a manual.
>
> Side note: I'm writing the manual in reST, including material converted fromhttp://wiki.xml3k.org/Amara2/QuickRef.  Can I say how much I dislike reST?

Uche Ogbuji

unread,
Aug 6, 2009, 10:31:01 PM8/6/09
to ak...@googlegroups.com
On Thu, Aug 6, 2009 at 8:04 PM, meppum <mme...@gmail.com> wrote:

Sorry, what's the mercurial version? A link would be helpful. Thanks.

http://wiki.xml3k.org/Amara2/Install

If those instructions don't help, report back to the list so we can make sure we cover further cases/platforms.

Luis Miguel Morillas

unread,
Aug 7, 2009, 4:06:02 AM8/7/09
to ak...@googlegroups.com
2009/8/7 Uche Ogbuji <uc...@ogbuji.net>:
> Luis covered the first two.
>
> On Thu, Aug 6, 2009 at 11:40 AM, meppum <mme...@gmail.com> wrote:
>>
>> 3. the following throws a deprecation error in python 2.6
>>
>> from amara import bindery
>>
>> I used the easy_install method and it installed version 2.0a1. Should
>> I be using a different version?
>
> I'm sorry, but we're overdue for a release.  Please use the mercurial
> version for now.  I'm hoping for a release in a couple of weeks.  One of the
> things I'm working on to make that happen is a manual.
>
> Side note: I'm writing the manual in reST, including material converted from
> http://wiki.xml3k.org/Amara2/QuickRef .  Can I say how much I dislike reST?
> Does anyone know of an option that would allow  me to work in Moin dialect
> and have it converted to reST?  I did check the Web and the anwer seems to
> be "no" (except for the lossy option of moin -> XHTML -> reST).  I'm hoping
> someone knows of something I didn't find.
>

But why are you writing in reST if you dislike it man? :-P Sphink
folks [1] are suggesting db2rst [2] I think that it's not mature but
we could improve it if you need it.
May be other option is docbook -> odf -> rst [3]


[1] http://sphinx.pocoo.org/intro.html#conversion-from-other-systems
[2] http://code.google.com/p/db2rst/
[3] http://jimmyg.org/blog/2009/my-experience-of-using-restructuredtext-to-write-the-definitive-guide-to-pylons.html


-- lm
Reply all
Reply to author
Forward
0 new messages