durusmail: durus-users: apparently random bug in durus
apparently random bug in durus
2010-06-21
2010-06-21
2010-06-21
2010-06-22
2010-06-22
2010-06-25
2010-06-25
2010-06-25
2010-06-25
2010-06-28
2010-06-28
2010-06-29
Python 2.7+ (Re: apparently random bug in durus)
2010-06-29
2010-06-28
2010-06-29
2010-06-29
2010-06-29
2010-06-29
2010-06-29
2010-06-30
2010-06-30
2010-06-30
2010-06-30
2010-06-30
2010-07-01
apparently random bug in durus
Alex Hall
2010-06-25
On 6/25/10, Binger David  wrote:
>
> On Jun 25, 2010, at 4:30 PM, Alex Hall wrote:
>
>> On 6/25/10, Binger David  wrote:
>>> Please edit c:\python26\lib\site-packages\durus\connection.py to get more
>>> information.
>>> In particular, insert at line 137, just before the klass = loads(data)
>>> line,
>>> some lines that print or write to a file,
>>> the values of sys.version, sys.path, sys.executable
>>> You might also insert an explicit "import durus.persistent_dict" there
>>> too, to see if that works as it should.
>> I did, and got the usual error.
>>> Also print out repr(data) while you are at it.
>>> Perhaps some change to sys.path or a chdir occurs
>>> that puts a directory containing a "durus" entry other
>>> than the durus installation directory on your path
>>> before the durus installation directory.
>> Here is the output I got when printing the three sys attributes to a
>> file. Hopefully the repr(data) one makes sense to you, because I have
>> no idea what it means. BTW, thanks for continuing to pursue this.
>>
>> path: c:\qwitter\src
>> C:\Windows\system32\python26.zip
>> c:\python26\DLLs
>> c:\python26\lib
>> c:\python26\lib\plat-win
>> c:\python26\lib\lib-tk
>> c:\python26
>> c:\python26\lib\site-packages
>> c:\python26\lib\site-packages\PIL
>> c:\python26\lib\site-packages\pyHook
>> c:\python26\lib\site-packages\win32
>> c:\python26\lib\site-packages\win32\lib
>> c:\python26\lib\site-packages\Pythonwin
>> c:\python26\lib\site-packages\wx-2.8-msw-unicode
>
> Do any of these directories have a surprise file or directory with a name
> starting
> with "durus" in them?
Not that I see, except for the usual Durus install log in c:\python26.
>
>>
>>
>> Version: 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit
>> (Intel)]
>
> I see you are using 2.6.5.  That seems good.
>
>>
>> Executable: c:\python26\python.exe
>>
>> Repr(data):
>> '\x80\x02cdurus.durus.persistent_dict\nPersistentDict\nq\x01.x\x9c\xb5Z}`\\E\
x11O\x8e\x92\xa6I\x9a\xb6iB\xcbw
>>
>> ...
>
> The string should start with
> '\x80\x02cdurus.persistent_dict\nPersistentDict\nq'
> not
> '\x80\x02cdurus.durus.persistent_dict\nPersistentDict\nq'.
>
> I think this is the problem.  I'm not sure how it originates.
> I noticed that qwitter imports Connection and FileStorage in an unusual way,
> with "from " imports that are inside a function body.  I'm not sure if that
> has an
> impact on this, but it is unusual.
> It looks like, when the FileStorage was initialized, the root was
> instantiated
> after an import that somehow obtained a "durus.durus.persistent_dict"
> module.
> That's not good.
>
> Your site-packages directory should have a durus directory that has
> a 'persistent_dict.py" file directly in it.  Is that what you have?  Do you
Yes; c:\python26\lib\site-packages\durus\persistent_dict.py
> have
> a durus directory inside a durus directory anywhere?
Not that I can find, and I looked through every path in sys.path.
>
>>
>>> I assume that nothing in qwitter monkey-patches durus, right?
>> I am not sure what you mean by that?
>
> Sorry to use jargon.  I mean it does not make run-time changes
> to names in the durus module.  This seems like a pretty unlikely
> possibility, but I thought I'd ask.
I cannot be sure as I just recently downloaded the source and I have
not been involved in its development. I see you are on the
qwitter-discuss list, though; most of the devs are on there, and one
of them should know.
>
>>>
>>>
>>> On Jun 21, 2010, at 2:40 PM, Alex Hall wrote:
>>>
>>>> File "c:\qwitter\src\session\storage.py", line 22, in __init__
>>>>   self.connection = Connection(self.store)
>>>> File "c:\python26\lib\site-packages\durus\connection.py", line 61, in
>>>> __init__
>>>>   self.root = self.get(ROOT_OID)
>>>> File "c:\python26\lib\site-packages\durus\connection.py", line 138, in
>>>> get
>>>>   klass = loads(data)
>>>> ImportError: No module named durus.persistent_dict
>>>
>>>
>>
>>
>> --
>> Have a great day,
>> Alex (msg sent from GMail website)
>> mehgcap@gmail.com; http://www.facebook.com/mehgcap
>
>


--
Have a great day,
Alex (msg sent from GMail website)
mehgcap@gmail.com; http://www.facebook.com/mehgcap
reply