Amara (XML) problem on Solaris

D

Doru-Catalin Togea

Hi!

I have ActiveState Python 2.4.1 on Win XP Pro, with Amara 1.1.6. I have a
script which works fine.

I am trying to run the same script on a Solaris machine, with Python 2.4.2
and Amara 1.1.6. It gives me this error:

bash-2.03$ python generateXML.py
Traceback (most recent call last):
File "generateXML.py", line 16, in ?
doc = amara.create_document()
AttributeError: 'module' object has no attribute 'create_document'
bash-2.03$

Any ideas what is going on?

Thanks,
Catalin


--

<<<< ================================== >>>>
<< We are what we repeatedly do. >>
<< Excellence, therefore, is not an act >>
<< but a habit. >>
<<<< ================================== >>>>
 
A

Alan Franzoni

Doru-Catalin Togea said:
AttributeError: 'module' object has no attribute 'create_document'
bash-2.03$

Any ideas what is going on?

I would say it's a problem with the Amara installation on Solaris. I've
never used it, but maybe it's a package from another source which acts a
bit differently.

Also, are you sure the code is correct? I've taken a peek at the Amara's
website, and the create_document() function seems to lie within the
binderytools module. I think the line should look like:

doc = amara.binderytools.create_document()

or

doc = binderytools.create_document()

or simply

create_document()

depending on the way you imported the module, but your previous code, if
really working on Windows, makes me think you did something like:

import amara.binderytools as amara

or something like that?
Please post some more code, if you can.

--
Alan Franzoni <[email protected]>
-
Togli .xyz dalla mia email per contattarmi.
To contact me, remove .xyz from my email address.
-
GPG Key Fingerprint:
5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E
 
D

Doru-Catalin Togea

Also, are you sure the code is correct? I've taken a peek at the Amara's
website, and the create_document() function seems to lie within the
binderytools module. I think the line should look like:

depending on the way you imported the module, but your previous code, if
really working on Windows, makes me think you did something like:

import amara.binderytools as amara

or something like that?
Please post some more code, if you can.

This is a simple test:

import amara

doc = amara.create_document()
doc.xml_append(doc.xml_create_element(u"units"))

print "OK"

On Windows XP Pro it runs like this:

C:\owera\test\xaps2-test>python amara-test1.py
OK

C:\owera\test\xaps2-test>

On Solaris it runs like this:

bash-2.03$ python amara-test1.py
Traceback (most recent call last):
File "amara-test1.py", line 3, in ?
doc = amara.create_document()
AttributeError: 'module' object has no attribute 'create_document'
bash-2.03$

Catalin

--

<<<< ================================== >>>>
<< We are what we repeatedly do. >>
<< Excellence, therefore, is not an act >>
<< but a habit. >>
<<<< ================================== >>>>
 
U

uche.ogbuji

Doru-Catalin Togea said:
import amara

doc = amara.create_document()
doc.xml_append(doc.xml_create_element(u"units"))

print "OK"

On Windows XP Pro it runs like this:

C:\owera\test\xaps2-test>python amara-test1.py
OK

C:\owera\test\xaps2-test>

On Solaris it runs like this:

bash-2.03$ python amara-test1.py
Traceback (most recent call last):
File "amara-test1.py", line 3, in ?
doc = amara.create_document()
AttributeError: 'module' object has no attribute 'create_document'
bash-2.03$

This came up when I was on vacation and incommunicado. What version of
Amara are you using on both platforms? How did you install them?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,157
Latest member
MercedesE4
Top