473,403 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Amara (XML) problem on Solaris

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. >>
<<<< ================================== >>>>
Dec 13 '05 #1
3 1349
Doru-Catalin Togea wrote:
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 <al***************@gmail.com>
-
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
Dec 13 '05 #2
On Wed, 14 Dec 2005, Alan Franzoni wrote:
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. >>
<<<< ================================== >>>>
Dec 14 '05 #3
Doru-Catalin Togea wrote:
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.

--
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://fourthought.com
http://copia.ogbuji.net http://4Suite.org
Articles: http://uche.ogbuji.net/tech/publications/

Jan 2 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: billcoumbe | last post by:
any recommendations? I'm looking for something that will just run from the unix command line to validate large (20-50Mb) XML files against an XML DTD. Ideally something that is actively...
4
by: Jeff | last post by:
I am trying to run the getstart_prep.cmd to enable the SALES_DB on the "/var/tmp/db2/ese/db2/solaris/db2xml81/reloc/IBM/db2/\$PRODVERS/bin/dxxadm enable_db SALES_DB" command I get the following...
0
by: Jay | last post by:
Ok, i had this posted on the other thread "XML w/ Python" but it kinda got off topic from the title to ill start a new thread. My question is this... the import of amara works in ActivePython......
0
by: Doru-Catalin Togea | last post by:
Hi! I am using Amara 1.1.6 in a project. I made an executable with py2exe but when I try to run it I am referred to the log file, which states: Traceback (most recent call last): File...
2
by: mirandacascade | last post by:
O/S WinXP Home Vsn of Python: 2.4 Wish to install Amara. Using amara-allinone-1.0.win32-py2.4.exe (2965KB) Forder structure before installation: c: python24
5
by: AdSR | last post by:
Hi, I'm having a problem with the Amara toolkit. Try this: >>> from amara import binderytools >>> raw = '<pq:test xmlns="http://example.com/namespace" xmlns:pq="http://pq.com/ns2"/>' >>> rwd...
5
by: karthigaj | last post by:
Hi, Is it possible to parse XML page using c solaris Anybody know abt it...pls reply me....
0
by: Rustom Mody | last post by:
I tried to install amara according to the recommendations on this list. There were evidently compilation errors. The results are below Also the quick reference gives 404 not found errors ...
0
by: Enbe | last post by:
I am currently trying to output the results in Amara. Her is an example count = 0 for root, dir, files in os.walk(path): for s in files: count += 1 print s this will only...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.