Opened 18 months ago
Closed 18 months ago
#15242 closed defect (fixed)
ChimeraX shell command-line: ValueError: list.remove(x): x not in list
| Reported by: | Owned by: | Eric Pettersen | |
|---|---|---|---|
| Priority: | moderate | Milestone: | |
| Component: | Core | Version: | |
| Keywords: | Cc: | Tom Goddard, Zach Pearson | |
| Blocked By: | Blocking: | ||
| Notify when closed: | Platform: | all | |
| Project: | ChimeraX |
Description
From: "Bopf, Mike (NIH/NIAID) [C]" <>
Subject: Running Quick Submit test on Mac
Date: May 17, 2024 at 1:55:24 PM PDT
To: Eric Pettersen , Tom Goddard
Eric or Tom,
I’m getting a strange error when running a quick submit on my Mac, and I can’t tell if it’s a configuration error or what. I’ve installed the latest Mac binary from today’s daily and the 1.1.18 NIHPresets. I’m trying to run the attached ‘run_4jnc_QS.sh’ script.
I get the following strange error:
"/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-
packages/chimerax/ui/gui.py", line 261, in open_pending_files
self._bad_drop_events.remove(bad_drop)
ValueError: list.remove(x): x not in list
BUG: ValueError: list.remove(x): x not in list
The full output is attached in ‘error.txt’.
Let me know if you have any ideas, or if you think it’s an issue specific to my setup.
Thanks,
Mike
Mike Bopf
NIAID/BCBB
Change History (7)
comment:1 by , 18 months ago
comment:2 by , 18 months ago
Here is the temporary fix I made, only on the develop branch
https://github.com/RBVI/ChimeraX/commit/e1e0de39d0e2f238808417f73af3ee63d4bbd43b
comment:3 by , 18 months ago
If I recall Zach recently sent an email or made ticket commenting on this same bug so he may also have a ticket open for this bug.
comment:4 by , 18 months ago
| Status: | assigned → accepted |
|---|
comment:5 by , 18 months ago
Tom & Eric,
This fix is only on your dev branch, right? Is there a nightly build that I can grab to try it out?
FYI, I noticed a reference to Mac OS in the comments. I was just upgraded to Sonoma (v 14.4.1) in case that has any bearing on this issue.
mike
From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu>
Date: Friday, May 17, 2024 at 19:44
To: goddard@cgl.ucsf.edu <goddard@cgl.ucsf.edu>, pett@cgl.ucsf.edu <pett@cgl.ucsf.edu>, Bopf, Mike (NIH/NIAID) [C] <mbopf@mail.nih.gov>
Cc: zjp@cgl.ucsf.edu <zjp@cgl.ucsf.edu>
Subject: [EXTERNAL] Re: [ChimeraX] #15242: ChimeraX shell command-line: ValueError: list.remove(x): x not in list
#15242: ChimeraX shell command-line: ValueError: list.remove(x): x not in list
-------------------------------+----------------------
Reporter: mbopf@… | Owner: pett
Type: defect | Status: assigned
Priority: moderate | Milestone:
Component: Core | Version:
Resolution: | Keywords:
Blocked By: | Blocking:
Notify when closed: | Platform: all
Project: ChimeraX |
-------------------------------+----------------------
Comment (by Tom Goddard):
Eric, you made a couple changes to the code that remedies the annoying
macOS behavior where every shell command-line argument is passed to
ChimeraX as a file drop event. Here are the two changes you made
https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FRBVI%2FChimeraX%2Fcommit%2F3b278d93eaeecf0ee8d0de7a76d7aa5b646f0372&data=05%7C02%7Cmbopf%40mail.nih.gov%7Cba8e7cedf7d14b00b60c08dc76cb49a9%7C14b77578977342d58507251ca2dc2b06%7C0%7C0%7C638515862685660783%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=Uz%2B78H9k7%2FOW4HB2Kuv66bBcwi0chpyDrKe2zW54Ilw%3D&reserved=0<https://github.com/RBVI/ChimeraX/commit/3b278d93eaeecf0ee8d0de7a76d7aa5b646f0372>
https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FRBVI%2FChimeraX%2Fcommit%2F4597be6b26a332bff80710805893988eb6661c57&data=05%7C02%7Cmbopf%40mail.nih.gov%7Cba8e7cedf7d14b00b60c08dc76cb49a9%7C14b77578977342d58507251ca2dc2b06%7C0%7C0%7C638515862685670209%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=uhMhGzy7lhAdkzcUS5a8Kt4Qo2lPKdFFr%2B%2Bg2PdVv7o%3D&reserved=0<https://github.com/RBVI/ChimeraX/commit/4597be6b26a332bff80710805893988eb6661c57>
You replaces a set.discard(element) call which generates no error when the
element is not in the set with a list.remove(element) call which is an
error when the element is not in the list.
I changed your code to the following so Mike can get on with his NIH3D
testing
{{{
if element in list:
list.remove(element)
}}}
But that may not be right because according to comments your reason for
changing the set to the list in the first place was to handle multiple
instances of the same file on the command-line. I'll let you re-analyze
the multi-file fix you were attempting.
--
Ticket URL: <https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Ftrac%2FChimeraX%2Fticket%2F15242%23comment%3A1&data=05%7C02%7Cmbopf%40mail.nih.gov%7Cba8e7cedf7d14b00b60c08dc76cb49a9%7C14b77578977342d58507251ca2dc2b06%7C0%7C0%7C638515862685676454%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=a5w8VnfmOFby9eKEhXUU2U7XUSJ7HaDHa2wDXtbQYK0%3D&reserved=0<https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/15242#comment:1>>
ChimeraX <https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fchimerax%2F&data=05%7C02%7Cmbopf%40mail.nih.gov%7Cba8e7cedf7d14b00b60c08dc76cb49a9%7C14b77578977342d58507251ca2dc2b06%7C0%7C0%7C638515862685680388%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=D0DKxmqWCauN3z%2FXbwdA%2BPHom2nXzvEiNbcyPkoFbAU%3D&reserved=0<https://www.rbvi.ucsf.edu/chimerax/>>
ChimeraX Issue Tracker
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and are confident the content is safe.
comment:6 by , 18 months ago
Yes, the "daily build" listed on the download page: https://www.cgl.ucsf.edu/chimerax/download.html
comment:7 by , 18 months ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
Went with a different fix: https://github.com/RBVI/ChimeraX/commit/e4d0168e48e0c5a073c99d76001fd5f65c1e3d1c
Apparently the arguments to --cmd and --script now also appear as drop events, so had to account for that.
Eric, you made a couple changes to the code that remedies the annoying macOS behavior where every shell command-line argument is passed to ChimeraX as a file drop event. Here are the two changes you made
https://github.com/RBVI/ChimeraX/commit/3b278d93eaeecf0ee8d0de7a76d7aa5b646f0372
https://github.com/RBVI/ChimeraX/commit/4597be6b26a332bff80710805893988eb6661c57
You replaces a set.discard(element) call which generates no error when the element is not in the set with a list.remove(element) call which is an error when the element is not in the list.
I changed your code to the following so Mike can get on with his NIH3D testing
But that may not be right because according to comments your reason for changing the set to the list in the first place was to handle multiple instances of the same file on the command-line. I'll let you re-analyze the multi-file fix you were attempting.