Opened 7 years ago

Closed 7 years ago

#1163 closed defect (wontfix)

Sample Error Tool

Reported by: msaqib_2020@… Owned by: Conrad Huang
Priority: normal Milestone: 0.7
Component: Documentation Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Hello, 

I am Daniyal Saqib, a student at DePauw University. I am currently working with Computer Science and Biochemistry Department over the summers, working on different tools of ChimeraX. 

We installed ChimeraX-Sample tool and it works fine with the command sample count. However, when I open the sample tool window it shows an error that says: 
 


"
chimerax.core.toolshed.ToolshedError: start_tool() failed for tool Sample Tool in bundle ChimeraX-Sample:
'str' object is not callable

File "/Applications/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/toolshed/info.py", line 530, in start_tool
"start_tool() failed for tool %s in bundle %s:\n%s" % (tool_name, self.name, str(e))) “ 

I have attached the screenshots, please guide me on what I can to do avoid this. 

Regards,
Daniyal Saqib

Added by email2trac

Added by email2trac

Attachments (2)

Screen Shot 2018-06-07 at 11.50.48 AM.png (176.8 KB ) - added by msaqib_2020@… 7 years ago.
Added by email2trac
Screen Shot 2018-06-07 at 11.50.42 AM.png (504.1 KB ) - added by msaqib_2020@… 7 years ago.
Added by email2trac

Download all attachments as: .zip

Change History (5)

by msaqib_2020@…, 7 years ago

Added by email2trac

by msaqib_2020@…, 7 years ago

Added by email2trac

comment:1 by Eric Pettersen, 7 years ago

Component: UnassignedDocumentation
Milestone: 0.7
Owner: set to Conrad Huang
Platform: all
Project: ChimeraX
Status: newassigned

comment:2 by Conrad Huang, 7 years ago

Status: assignedfeedback

Hi, Daniyal.

The problem with the sample code is that it was written before one of the changes we made to our atomic structure API. I've committed a fix to our git repository, but it's very simple: just change the function call m.atomspec() into a property access m.atomspec.

diff --git a/src/examples/sample/src/tool.py b/src/examples/sample/src/tool.py
index 0daeeb786..5e8dc36a4 100755
--- a/src/examples/sample/src/tool.py
+++ b/src/examples/sample/src/tool.py
@@ -23,7 +23,7 @@ class SampleTool(HtmlToolInstance):
         from urllib.parse import quote
         for m in self.session.models.list(type=AtomicStructure):
             html.append("<li><a href=\"%s:%s\">%s - %s</a></li>" %
-                        (self.CUSTOM_SCHEME, quote(m.atomspec()),
+                        (self.CUSTOM_SCHEME, quote(m.atomspec),
                          m.id_string(), m.name))
         html.extend(["</ul>",
                      "<h3>Output:</h3>",

Also, since you are trying out development for ChimeraX, can I trouble you to look at our developer tutorial at http://www.cgl.ucsf.edu/chimerax/docs/devel/tutorials/introduction.html ?
It's very rough, and I would really appreciate any feedback.

Thanks.

Conrad

comment:3 by Conrad Huang, 7 years ago

Resolution: wontfix
Status: feedbackclosed

The documentation is still being overhauled, but the "Sample Tool" example is being retired in favor of a series of smaller examples.

Note: See TracTickets for help on using tickets.