On Tuesday, December 3, 2013 9:00:51 PM UTC-8, RjOllos wrote:
>
> On Tuesday, December 3, 2013 8:29:21 PM UTC-8, ilewismsl wrote:
>>
>> I still have no idea what is going on, but I can see that the source of 
>> the problem really is somehow related to the module ordereddict. 
>>
>> I  modified a very simple plugin to add the statement:
>>    from ordereddict import OrderedDict
>>
>> When Trac tries to load this plugin, in the log I get:
>> -------------------
>> Traceback (most recent call last):
>>   File "build\bdist.win32\egg\trac\loader.py", line 90, in _load_py_files
>>     module = imp.load_source(plugin_name, plugin_file)
>>   File "d:\trac\msl\plugins\ticket_clone.py", line 4, in <module>
>>     from ordereddict import OrderedDict
>> ImportError: No module named ordereddict
>> -------------------
>>
>> But, from a Python shell in the same environment I can enter:
>> -------------------
>> >>> from ordereddict import OrderedDict
>> >>> help (OrderedDict)
>> Help on class OrderedDict in module ordereddict:
>> class OrderedDict(__builtin__.dict, UserDict.DictMixin)
>> ... {rest of the help from OrderedDict)
>> -------------------
>> and I get all of the help from the OrderedDict class. This seems to imply 
>> that the module is there and fine. 
>>
>> Does this tell you anything?
>>
>> Ian
>>
>
> I guess the module search path is not the same when running your webserver 
> as it is when starting a shell? Maybe try shutting down the webserver and 
> running tracd (i.e. TracStandalone) and see if you can narrow it down to a 
> problem with you webserver configuration. 
>

Well, TracBlockdiag is working now on the production server. No idea why, 
at least not in any detail. I tried your recommendation of running under 
tracd (never done that before; went very easily). And, TracBlockdiag worked 
as advertised. I killed tracd and restarted the production server. Still 
failed. I tried the tracd-script directly with the Python -E and -s 
switches to tell it to ignore all environment variables. TracBlockdiag 
worked fine. Tried production server again. Still failed. Tried to find any 
environment difference between the context I was testing under with tracd 
and that for the production server. There were differences but I could find 
nothing that looked like it could possibly matter. 

I reset the permissions on the entire python tree in case there was some 
access control error of some kind (the server runs under a different user 
than I was using for testing tracd). No luck. 

Finally I tried this:
  pip uninstall ordereddict
  pip install ordereddict

After that the production server started working. Odd. I only learned about 
ordereddict and did the original install yesterday or maybe the day before. 
Certainly it is easy to see some kinds of system packages working in one 
context and failing in others, but a basic data structure class? Still, I 
am glad it works now. I have wanted Blockdiag for a long time, but I could 
never get the plugin to work. For certain simple things it makes much more 
appealing diagrams that graphviz, at least to my eye. 


Thank you for your pointers. 

Ian

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to