On 2011-11-15 at 18:55:31, Ethan Jucovy wrote:
> On Tue, Nov 15, 2011 at 4:44 PM, Chris Nelson wrote:
>> 
>>      In estimation tools, workload.py does "from
>> estimationtools.utils import ...".  When I copied that style
>> and had my tracjsgantt.py do "from tracjsgantt.tracpm import
>> TracPM", I get the error above.  When I make it "from tracpm
>> import TracPM", it works!  I have no idea why but running
>> code trumps documentation and examples so I'm not going to complain.
> 
> Probably it's failing because you have a tracjsgantt.py file
> in the tracjsgantt directory.  So when you say "from
> tracjsgantt.tracpm import TracPM", Python finds the
> tracjsgantt.py file first, and gets confused.  If you renamed
> tracjsgantt.py to something else, the import would probably
> do what you're expecting.
> 
> (I'm using a lot of "probablys" because the actual details of
> this depend on your `sys.path`, which is very environment-specific.)
> ...

My problem with that analysis is that I have estimation tools and my plugin 
running side by side so it seems that sys.path should affect them both the same 
way.

-- 
Christopher Nelson, Software Engineering Manager
SIXNET - Solutions for Your Industrial Networking Challenges
331 Ushers Road, Ballston Lake, NY  12019
Tel: +1.518.877.5173, Fax: +1.518.877.8346 www.sixnet.com 
 

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en.

Reply via email to