Opened 6 years ago

Closed 6 years ago

#3067 closed defect (fixed)

Bug reporter losing log text

Reported by: goddard@… Owned by: Greg Couch
Priority: normal Milestone: 1.0
Component: Logging Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Darwin-19.4.0-x86_64-i386-64bit
ChimeraX Version: 0.94 (2020-04-16)
Description
Bug reporter is losing information from the log.  In this error the command "color # orange" appears above the "Expected a color..." message as shown in the attached image.  My guess is the missing text somehow got lost due to conversion from html to plain text.

This is a pretty important problem -- there have been many bug reports where I couldn't understand the log, it appeared that commands must be missing, and I guess they probably were.


Log:
UCSF ChimeraX version: 0.94.dev202004160103 (2020-04-16)  
© 2016-2020 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

Expected a color or one of 'byatom', 'bychain', 'byelement', 'byhetero',
'bymodel', 'bynucleotide', 'bypolymer', 'fromatoms', or 'random' or a keyword  




OpenGL version: 4.1 ATI-3.8.24
OpenGL renderer: AMD Radeon Pro Vega 20 OpenGL Engine
OpenGL vendor: ATI Technologies Inc.
File attachment: Screen Shot 2020-04-16 at 8.23.06 PM.png

Screen Shot 2020-04-16 at 8.23.06 PM.png

Attachments (1)

Screen Shot 2020-04-16 at 8.23.06 PM.png (132.0 KB ) - added by goddard@… 6 years ago.
Added by email2trac

Download all attachments as: .zip

Change History (6)

by goddard@…, 6 years ago

Added by email2trac

comment:1 by Eric Pettersen, 6 years ago

Cc: Greg Couch added
Component: UnassignedCore
Owner: set to Tom Goddard
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionBug reporter losing log text

comment:2 by Tom Goddard, 6 years ago

As expected, log.plain_text() simply does not include the command which is of course in the html page source.

from chimerax.log.cmd import get_singleton
log = get_singleton(session)
log.plain_text()
Out[4]: "UCSF ChimeraX version: 0.94.dev202004160103 (2020-04-16) \n© 2016-2020 Regents of the University of California. All rights reserved. \nHow to cite UCSF ChimeraX \n\nExpected a color or one of 'byatom', 'bychain', 'byelement', 'byhetero',\n'bymodel', 'bynucleotide', 'bypolymer', 'fromatoms', or 'random' or a keyword \n\n> toolshed show Shell\n\n"

log.page_source
Out[5]: 'UCSF ChimeraX version: 0.94.dev202004160103 (2020-04-16)<br>\n© 2016-2020 Regents of the University of California. All rights reserved.<br>\n<a href="cxcmd:help help:credits.html">How to cite UCSF ChimeraX</a><br/><div class="cxcmd"><a href="help:user/commands/color.html">color</a> <span style="color:white; background-color:crimson;"># orange</span></div><font color="crimson"><b>Expected a color or one of &#x27;byatom&#x27;, &#x27;bychain&#x27;, &#x27;byelement&#x27;, &#x27;byhetero&#x27;, &#x27;bymodel&#x27;, &#x27;bynucleotide&#x27;, &#x27;bypolymer&#x27;, &#x27;fromatoms&#x27;, or &#x27;random&#x27; or a keyword<br>\n</b></font><div class="cxcmd"><div class="cxcmd_as_doc">toolshed show Shell</div><div class="cxcmd_as_cmd"><a href="cxcmd:toolshed show Shell">toolshed show Shell</a></div></div>'

comment:3 by Tom Goddard, 6 years ago

Cc: Greg Couch removed
Component: CoreLogging
Owner: changed from Tom Goddard to Greg Couch

The log contains two copies of most commands, one with the command linking to documentation and one with the command link causing command execution. Only one of these two versions is shown in the log panel. But the Log.plain_text() code (bundles/log/src/tool.py) has to do some fancy footwork so both don't appear in the plain text output. That fancy footwork unfortunately eliminates all trace of logged commands that had a parsing error, such as "color # red".

This html in the log for syntax error "color # red" looks like

<div class="cxcmd">
<a href="help:user/commands/color.html">color</a> <span style="color:white; background-color:crimson;"># orange</span>
</div>

But for a successful command like open test.py the html looks like

<div class="cxcmd">
<div class="cxcmd_as_doc">
<a href="help:user/commands/open.html">open</a> test.py
</div>
<div class="cxcmd_as_cmd">
<a href="cxcmd:open test.py">open test.py</a>
</div>
</div>

The filtering code needs to be fixed to not filter out the syntax error case. Greg wrote that and probably knows best what the log html looks like in different cases so reassigning to him to fix it.

comment:4 by Tom Goddard, 6 years ago

Milestone: 1.0

This is pretty important for understanding bug reports so milestoning for 1.0.

comment:5 by Greg Couch, 6 years ago

Resolution: fixed
Status: assignedclosed

Fixed.

Note: See TracTickets for help on using tickets.