Never got it resolved. Just moved my workspace to a CentOS VM and continued work from there. Don't know how to get it working on Windows.
On Friday, September 7, 2012 3:35:04 PM UTC-4, Ethan Jucovy wrote: > > Hi John, > > Did you manage to resolve this? I just ran into a similar problem. I > haven't traced down exactly what's causing it, or how to reproduce it, but > I was able to fix it by adding these two lines to the start of my plugin's > Python file: > > from pkg_resources import DistributionNotFound, get_distribution > from trac import __version__ as VERSION > > It seems like some kind of circular import problem involving pkg_resources > magic; by making sure that pkg_resources was imported before > trac.__version__ I think the circular import is prevented. > > -Ethan > > On Tue, Aug 21, 2012 at 1:21 PM, John of NOVA <[email protected]<javascript:> > > wrote: > >> The plugin is called required.py >> >> It does reference C:\Users\mcmahonjoh\Desktop\Python >> Project\trac\__init__.py >> >> This is what happens: >> >> >>> import trac >> >>> print trac >> <module 'trac' from 'C:\Users\mcmahonjoh\Desktop\Python >> Project\trac\__init__.py'> >> >> >> >> On Tuesday, August 21, 2012 12:58:18 PM UTC-4, Ethan Jucovy wrote: >> >>> Maybe a silly question, but did you name your plugin trac.py (or >>> trac/something.py)? It looks like "from trac import [...]" might be >>> finding the wrong file somehow. What happens if you just run "import trac; >>> print trac" from the command line? Does it refer to the >>> file C:\Users\mcmahonjoh\**Desktop\Python Project\trac\__init__.py or >>> something surprising? >>> >>> On Tue, Aug 21, 2012 at 11:51 AM, John of NOVA <[email protected]>wrote: >>> >>>> It did work fine. But I guess I'll move my work to the CentOS VM to >>>> see if that resolve the problem then. >>>> >>>> On Tuesday, August 21, 2012 9:35:49 AM UTC-4, olemis wrote: >>>> >>>>> On 8/21/12, RjOllos <[email protected]> wrote: >>>>> > I second the comment by Olemis. Can you run?: >>>>> > import pkg_resources >>>>> > >>>>> >>>>> from the command line this should look like >>>>> >>>>> {{{ >>>>> #!sh >>>>> >>>>> $ X:\path\to\python.exe -c "import pkg_resources" >>>>> >>>>> }}} >>>>> >>>>> > If not, you need to install setuptools: >>>>> > http://pypi.python.org/pypi/**se**tuptools<http://pypi.python.org/pypi/setuptools> >>>>> > >>>>> > >>>>> >>>>> ... and if it works then I have no clue ... >>>>> O.o >>>>> >>>>> -- >>>>> Regards, >>>>> >>>>> Olemis. >>>>> >>>>> Blog ES: http://simelo-es.blogspot.com/ >>>>> Blog EN: http://simelo-en.blogspot.com/ >>>>> >>>>> Featured article: >>>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Trac Users" group. >>>> To view this discussion on the web visit https://groups.google.com/d/** >>>> msg/trac-users/-/XOEwjfLvpgoJ<https://groups.google.com/d/msg/trac-users/-/XOEwjfLvpgoJ> >>>> . >>>> >>>> To post to this group, send email to [email protected]. >>>> To unsubscribe from this group, send email to trac-users+...@** >>>> googlegroups.com. >>>> >>>> For more options, visit this group at http://groups.google.com/** >>>> group/trac-users?hl=en<http://groups.google.com/group/trac-users?hl=en> >>>> . >>>> >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Trac Users" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/trac-users/-/M0GHRaAVyacJ. >> >> To post to this group, send email to [email protected]<javascript:> >> . >> To unsubscribe from this group, send email to >> [email protected] <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/trac-users?hl=en. >> > > -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/okkSR6furzgJ. 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-users?hl=en.
