473,830 Members | 2,103 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_do cument()
AttributeError: 'module' object has no attribute 'create_documen t'
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 1376
Doru-Catalin Togea wrote:
AttributeError: 'module' object has no attribute 'create_documen t'
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.binderyto ols.create_docu ment()

or

doc = binderytools.cr eate_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.binderyto ols 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.binderyto ols as amara

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


This is a simple test:

import amara

doc = amara.create_do cument()
doc.xml_append( doc.xml_create_ element(u"units "))

print "OK"

On Windows XP Pro it runs like this:

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

C:\owera\test\x aps2-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_do cument()
AttributeError: 'module' object has no attribute 'create_documen t'
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_do cument()
doc.xml_append( doc.xml_create_ element(u"units "))

print "OK"

On Windows XP Pro it runs like this:

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

C:\owera\test\x aps2-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_do cument()
AttributeError: 'module' object has no attribute 'create_documen t'
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
3092
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 supported and has good documentation! If there's nothing suitable for Solaris a command line program for Windows might do - currently using XMetaL/XMLSpy parsers which aren't really suited to large files.
4
2419
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 error: SQL0444N Routine "*EnableDB" (specific name "SQL040218113955930") is implemented with code in library or path ".../sqllib/function/db2xml", function "dxxEnableDB" which cannot be accessed. Reason code: "4". SQLSTATE=42724 DXXM001W A...
0
1007
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... PythonWin 2.3.5 (#62, Feb 9 2005, 16:17:08) on win32. Portions Copyright 1994-2004 Mark Hammond (mhammond@skippinet.com.au) - see 'Help/About PythonWin' for further copyright information. >>> import amara
0
933
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 "makeTestSpec.py", line 281, in ? File "makeTestSpec.py", line 114, in __init__ File "makeTestSpec.py", line 125, in loadTests File "amara\__init__.pyc", line 50, in parse
2
1440
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
1535
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 = binderytools.bind_string(raw) >>> print rwd.xml() <?xml version="1.0" encoding="UTF-8"?> <pq:test xmlns:pq="http://pq.com/ns2"/>
5
1490
by: karthigaj | last post by:
Hi, Is it possible to parse XML page using c solaris Anybody know abt it...pls reply me....
0
1062
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 Thanks $ sudo easy_install amara Searching for amara
0
1010
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 output to a console. How do I output 's' to xml using amara. Thanks. I can also post what process I am making with trying to get it output with amara.
0
9793
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9642
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10777
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10526
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10206
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7747
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5617
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4416
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.