[Xapian-tickets] [Xapian] #477: "from xapian import *" in Python raises AttributeError

Xapian nobody at xapian.org
Fri May 14 02:00:40 BST 2010


#477: "from xapian import *" in Python raises AttributeError
-----------------------------+----------------------------------------------
 Reporter:  michelp          |       Owner:  richard
     Type:  defect           |      Status:  new    
 Priority:  normal           |   Milestone:  1.2.1  
Component:  Xapian-bindings  |     Version:  1.2.0  
 Severity:  minor            |    Keywords:         
Blockedby:                   |    Platform:  All    
 Blocking:                   |  
-----------------------------+----------------------------------------------
Changes (by olly):

  * owner:  olly => richard
  * version:  1.1.4 => 1.2.0
  * component:  Other => Xapian-bindings
  * milestone:  => 1.2.1


Old description:

> >>> from xapian import *
> Traceback (most recent call last):
>   File "<console>", line 1, in <module>
> AttributeError: 'module' object has no attribute 'Document_unserialise'
> >>>
>
> This appears to be because this name is exported by the module's __all__
> but does not actually exist in the module itself:
>
> >>> 'Document_unserialise' in xapian.__all__
> True
> >>> hasattr(xapian, 'Document_unserialise')
> False
> >>>

New description:

 {{{
 >>> from xapian import *
 Traceback (most recent call last):
   File "<console>", line 1, in <module>
 AttributeError: 'module' object has no attribute 'Document_unserialise'
 >>>
 }}}

 This appears to be because this name is exported by the module's
 {{{__all__}}} but does not actually exist in the module itself:

 {{{
 >>> 'Document_unserialise' in xapian.__all__
 True
 >>> hasattr(xapian, 'Document_unserialise')
 False
 >>>
 }}}

--

Comment:

 I see this with trunk, by patching smoketest with the attached patch.

 Richard?

-- 
Ticket URL: <http://trac.xapian.org/ticket/477#comment:3>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list