[Zope] Trouble
John Ziniti
jziniti@speakeasy.org
Fri, 07 Feb 2003 13:29:06 -0500
This is a reeeeeal stretch, but the only time I've seen this
myself was when I *stupidly* set the variable "__name__"
in one of my Python Products. Python, of course, uses
the variable __name__ to identify the run context of a
module, so the Persistence package was not properly
importing the Persistent object. A quick check for the
word __name__ in the modules being imported might
help???
AM wrote:
> If you have all those files it should work ...
>
> from INSTANCE_HOME/lib/python/Persistence/: __init__.py:
>
> """Provide access to Persistent and PersistentMapping
>
> This avoids dependency on the database package name.
>
> While obviously there is nothing in this module, the correct names are
> inserted by the __init__.py in ZODB, jumpstarting the process.
> """
>
> So it automagically inserts the name in the required namespace.
>
> Beyond that meybe somebody who knows more about this might be able to
> help.
>
> AM
>
> Stefano Gualandi wrote:
>
>> AM wrote:
>>
>>> There should be folder called Persistence in
>>> INSTANCE_HOME/lib/python. Also there should be related files in
>>> INSTANCE_HOME/lib/python/App and INSTANCE_HOME/lib/python/ZODB
>>
>>
>>
>> This are the files I have:
>>
>> INSTANCE_HOME/lib/python/Persistence/: __init__.py __init__.pyc
>>
>> INSTANCE_HOME/lib/python/App/: ... PersistentExtra.py
>> PersistentExtra.pyc ...
>>
>> INSTANCE_HOME/lib/python/ZOBD/: ... PersistentList.py
>> PersistentList.pyc PersitentMapping.py PersitentMapping.pyc
>> cPersistence.c cPersistence.h cPersistence.so ...
>>
>>
>> but there is not trace of a file or module Persistent.py!
>>
>> Stefano
>>
>>
>>
>>
>>
>>>
>>> hth
>>> AM
>>>
>>> Stefano Gualandi wrote:
>>>
>>>> Hello!
>>>> I didn't find the right place where to write this message, but I
>>>> got the following problem after having installed zope 2.6.1b2:
>>>>
>>>> ----------------------------
>>>> Site Error
>>>>
>>>> An error was encountered while publishing this resource.
>>>>
>>>> exceptions.ImportError
>>>> Sorry, a site error occurred.
>>>>
>>>> Traceback (innermost last):
>>>>
>>>> * Module ZPublisher.Publish, line 150, in publish_module
>>>> * Module ZPublisher.Publish, line 57, in publish
>>>> * Module ZPublisher.Publish, line 208, in get_module_info
>>>> * Module Main, line 30, in ?
>>>> * Module Globals, line 23, in ?
>>>> * Module App.PersistentExtra, line 15, in ?
>>>>
>>>> ImportError: (<class exceptions.ImportError at 0x80cfdd4>, 'cannot
>>>> import name Persistent')
>>>> ------------------------------
>>>>
>>>> I have the following:
>>>>
>>>> Python 2.1 debian package
>>>> Apache_1.3.27+OpenSSL_0.9.7+ModSSL_2.8.12
>>>>
>>>> I had a look at the code: it demand for a Persitent module, but I
>>>> didn/t find any Persitent.py file: is it normal?
>>>>
>>>> thanks in advance,
>>>> Stefano
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> Catholic University of Louvain
>>>> Department of Computing Science and Engineering
>>>> Place Sainte Barbe, 2
>>>> B-1348 Louvain/la/Neuve, Belgium
>>>> Phone: +32 10 47 90 13
>>>> Fax: +32 10 45 03 45
>>>>
>>>>
>>>
>>
>>
>>
>>
>>
>