Re: Logging failures (was Re: Comments again...)
walt <walt-76oD7HcvC/[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 3 Jun 2004, will guaraldi wrote:
>
> Walt--you're seeing two problems with the stacktrace you're providing.
> The first problem is that the comments plugin couldn't read the comments
> for whatever entry you were looking at. That could be a permissions issue
> or something along those lines--I've never encountered this issue, so i'm
> just guessing.
>
Yes, I have resolved that one. It was as I mentioned earlier that I had
forgotten to install PyXML. Oops.
> When that problem gets kicked up, it goes into an exception handling block
> which causes the comments plugin to log the issue. You need to set the
> "logdir" property in your config.py file to a directory that PyBlosxom can
> log to. Once you do this, then the comments plugin will create a
> comments.log file in that directory and the stack trace you're seeing will
> go away.
>
Yes, I've set logdir and the path is correct. The permissions on the
log directory are the same as the permissions on the comments directory.
Since I can successfully create comments now I would assume that it
would also be able to write logs. I just tested the failure (by taking
away write permissions on the comment directory and trying to add a
comment) and I still get the same failure when it attempts to log.
I hate problems like this because I'm sure it's just something simple
that I missed given my lack of python knowledge. Python 2.2.1 is
kosher, right?
> In regards, to "is there a way to verify exactly what modules are being
> used", the answer is no and yes. We don't have anything that shows you
> exactly which module you're using (i.e. what path the module file being
> used has), but it is possible to do--you'd have to tweak the source code.
>
> That's a useful thing to have--I'll add that feature for 1.0.1.
>
Any chance you could toss that source tweak this way so I could give it
a quick whirl?
> /will
>
>
> On Thu, 3 Jun 2004, walt wrote:
> >
> > I completely whacked the Pyblosxom directory under site-packages/ before
> > I installed 1.0.0 (just to be safe :). Could there be modules hiding
> > out anywhere else?
> >
> > Optionally, is there a way (verbose run or something) that I can verify
> > exactly which module is being used?
> >
> >
> > On Thu, 3 Jun 2004, Ted Leung wrote:
> >
> > > There've been a few variants of implementations of the log. Are you
> > > sure that
> > > you don't have mix of files from different pyblosxom versions?
> > >
> > > Ted
> > >
> > > On Jun 2, 2004, at 3:47 PM, walt wrote:
> > >
> > > >
> > > > So the comments plugin is dying because it gets some error while
> > > > reading
> > > > the comments. I'm not sure why it can't read the comments (although
> > > > I'm
> > > > half-suspecting I forgot to install pyXML. I'll check that.)
> > > >
> > > > Anyway, when it goes to log it dies with this (just the tail here):
> > > >
> > > > File "/home/www/htdocs/plugins/comments.py", line 447, in
> > > > cb_story_end
> > > > entry['comments'] = readComments(entry, config)
> > > > File "/home/www/htdocs/plugins/comments.py", line 94, in readComments
> > > > tools.log("Couldn't read comments for entry: ",entry)
> > > > AttributeError: 'module' object has no attribute 'log'
> > > >
> > > > This is odd because I checked the tools.py module that is installed and
> > > > it definitely creates a global log variable in make_logger.
> > > >
> > > > I'm running Python 2.2.1 on OpenBSD. Any thoughts?
> > > >
> > > >
> > > > On Wed, 2 Jun 2004, walt wrote:
> > > >
> > > >>
> > > >> I knew all I had to do was send the email and I would immediately find
> > > >> the answer. If the comment plugin is active then the standard story
> > > >> template for a single entry is overridden by comment-story.html which
> > > >> also incorporates comment-form.html. That'll do.
> > > >>
> > > >> Now I just need to work out why I die if a story has a comment. The
> > > >> first error is that it can't write the real error out to the log.
> > > >> I'll
> > > >> see what I can dig up.
> > > >>
> > > >>
> > > >> On Wed, 2 Jun 2004, walt wrote:
> > > >>
> > > >>>
> > > >>> So... how do I add a comment to a story?
> > > >>>
> > > >>> I've put the plugin in-place. It verifies okay. I added
> > > >>> $num_comments
> > > >>> to my story.html template so now I get a nice 'Comments: 0' for all
> > > >>> my
> > > >>> entries.
> > > >>>
> > > >>> But what's the link to get someone to the form to add a comment? I
> > > >>> can't find it anywhere. It doesn't appear to be in the README or in
> > > >>> any
> > > >>> of the flavour templates (the base ones or the plugin ones).
> > > >>>
> > > >>> Am I just completely missing something?
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>> -------------------------------------------------------
> > > >>> This SF.Net email is sponsored by the new InstallShield X.
> > > >>> From Windows to Linux, servers to mobile, InstallShield X is the one
> > > >>> installation-authoring solution that does it all. Learn more and
> > > >>> evaluate today! http://www.installshield.com/Dev2Dev/0504
> > > >>> _______________________________________________
> > > >>> pyblosxom-users mailing list
> > > >>> pyblosxom-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > > >>> https://lists.sourceforge.net/lists/listinfo/pyblosxom-users
> > > >>>
> > > >>
> > > >>
> > > >>
> > > >> -------------------------------------------------------
> > > >> This SF.Net email is sponsored by the new InstallShield X.
> > > >> From Windows to Linux, servers to mobile, InstallShield X is the one
> > > >> installation-authoring solution that does it all. Learn more and
> > > >> evaluate today! http://www.installshield.com/Dev2Dev/0504
> > > >> _______________________________________________
> > > >> pyblosxom-users mailing list
> > > >> pyblosxom-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > > >> https://lists.sourceforge.net/lists/listinfo/pyblosxom-users
> > > >>
> > > >
> > > >
> > > >
> > > > -------------------------------------------------------
> > > > This SF.Net email is sponsored by the new InstallShield X.
> > > >> From Windows to Linux, servers to mobile, InstallShield X is the one
> > > > installation-authoring solution that does it all. Learn more and
> > > > evaluate today! http://www.installshield.com/Dev2Dev/0504
> > > > _______________________________________________
> > > > pyblosxom-users mailing list
> > > > pyblosxom-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > > > https://lists.sourceforge.net/lists/listinfo/pyblosxom-users
> > > >
> > > ----
> > > Ted Leung Blog: <http://www.sauria.com/blog>
> > > PGP Fingerprint: 1003 7870 251F FA71 A59A CEE3 BEBA 2B87 F5FC 4B42
> > > This message is: [ ] bloggable [x] ask first [ ] private
> > >
> > >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by the new InstallShield X.
> > >From Windows to Linux, servers to mobile, InstallShield X is the one
> > installation-authoring solution that does it all. Learn more and
> > evaluate today! http://www.installshield.com/Dev2Dev/0504
> > _______________________________________________
> > pyblosxom-users mailing list
> > pyblosxom-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > https://lists.sourceforge.net/lists/listinfo/pyblosxom-users
> >
>
> --
> whatever it is, you can find it at http://www.bluesock.org/~willg/
> except Will--you can only see him in real life.
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the new InstallShield X.
> From Windows to Linux, servers to mobile, InstallShield X is the one
> installation-authoring solution that does it all. Learn more and
> evaluate today! http://www.installshield.com/Dev2Dev/0504
> _______________________________________________
> pyblosxom-users mailing list
> pyblosxom-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/pyblosxom-users
>
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504