[XML-SIG] [ pyxml-Bugs-619155 ] AttributeError: Context.Context

noreply@sourceforge.net noreply@sourceforge.net
Sat, 05 Oct 2002 21:58:07 -0700


Bugs item #619155, was opened at 2002-10-05 21:58
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=619155&group_id=6473

Category: DOM
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: AttributeError: Context.Context

Initial Comment:
Environment:
   Python 2.2.1 (#1, Jun 25 2002, 10:55:46)
   
[GCC 2.95.3-5 (cygwin special)] on cygwin
   PyXML 0.8.1 (used 
Windows Installer)
   Windows XP

>From inside the 
python interpreter shell I run the following:

import 
sys
from xml.dom.ext.reader import Sax2

# create 
Reader object
reader = Sax2.Reader()

# parse the 
document
doc = reader.fromStream(sys.stdin)

I then 
type in:

<?xml version="1.0" 
?>
<root/>
<CTRL+D>

Then I run:

from xml 
import xpath

and get the following traceback:

>>> 
from xml import xpath
Traceback (most recent call last):
  
File "<stdin>", line 1, in ?
  File "C:\Python22\Lib\site-
packages\_xmlplus\xpath\__init__.py", line 106, in
?
    
import Context
  File "/cygdrive/c/python22/lib/site-
packages/_xmlplus/xpath/Context.py", line
16, in ?
    
import CoreFunctions
  File "/cygdrive/c/python22/lib/site-
packages/_xmlplus/xpath/CoreFunctions.py",
 line 21, in 
?
    from xml.xpath import Util, Conversions
  File 
"/cygdrive/c/python22/lib/site-
packages/_xmlplus/xpath/Conversions.py", l
ine 23, in ?
    
from xml.utils import boolean
ImportError: cannot import 
name boolean

I run the same line (from xml import xpath) 
again with no such errors.

I then run:

nodes = 
xpath.Evaluate('quotation/note', 
doc.documentElement)

and get:

>>> nodes = 
xpath.Evaluate('quotation/note', 
doc.documentElement)
Traceback (most recent call 
last):
  File "<stdin>", line 1, in ?
  File "C:\Python22\Lib\site-
packages\_xmlplus\xpath\__init__.py", line 68, in 
E
valuate
    con = Context.Context(contextNode, 0, 
0)
AttributeError: 'module' object has no attribute 
'Context'
>>> nodes = xpath.Evaluate('quotation/note', 
doc.documentElement)
Traceback (most recent call 
last):
  File "<stdin>", line 1, in ?
  File "C:\Python22\Lib\site-
packages\_xmlplus\xpath\__init__.py", line 68, in 
E
valuate
    con = Context.Context(contextNode, 0, 
0)
AttributeError: 'module' object has no attribute 'Context'


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=619155&group_id=6473