Opened 4 years ago
Closed 4 years ago
#5412 closed defect (fixed)
AlphaFold unzipping of results: expected str, bytes or os.PathLike object, not NoneType
Reported by: | Owned by: | Tom Goddard | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Structure Prediction | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
The following bug report has been submitted: Platform: Windows-10-10.0.19043 ChimeraX Version: 1.3.dev202109170828 (2021-09-17 08:28:14 UTC) Description (Describe the actions that caused this problem to occur here) Log: Startup Messages --- warning | Your computer has Intel graphics driver 7639 with a known bug that causes all Qt user interface panels to be blank. ChimeraX can partially fix this but may make some panel titlebars and edges black. Hopefully newer Intel graphics drivers will fix this. UCSF ChimeraX version: 1.3.dev202109170828 (2021-09-17) © 2016-2021 Regents of the University of California. All rights reserved. How to cite UCSF ChimeraX > open C:/Users/there/Downloads/ChimeraX/AlphaFold/prediction_6/best_model.pdb Chain information for best_model.pdb #1 --- Chain | Description A | No description available > ui tool show AlphaFold > alphafold predict #1 [Repeated 1 time(s)]Running AlphaFold prediction [Repeated 1 time(s)] > alphafold predict > MAPPAAAPELGSCCICLDAITGAARALPCLHAFCLACIRRWLEGRPTCPLCKAPVQSLIHSVASDECFEEIPVGGGPGADGALEPDAAVIWGEDYDAGPIDLTAADGEASGAGGEAGAADGSEAGGGAGGAEEAGEARGAGAGRAAGAAGGRAGRGADAAQEFIDRVARGPRLPLLPNTPEHGPGAPYLRRVVEWVEGALVGSFAVTARELAAMTDYVMAMLAECGFDDDGLADAMEPLIGEDDAPAFVRSLLFVAARCVTVGPSHLIPQQSAPPGGRGVVFLDTSDSDSEGSEDDSWSESEESSSGLSTSDLTAIDDTETEPETDAEVESRRTRGASGAARARRPAERQYVSTRGRQTPAVQPAPRSLARRPCGRAAAVSAPPSSRSRGGRRDPRLPAAPRAAPAAQARACSPEPREEGRGAGLGVAAGETAGWGAGSEEGRGERRARLLGEAGPPRVQARRRRRTELDRAPTPAPAPAPAPAPISTVIDLTANAPARPADPAPAAAPGPASAGAQIGTPAAAAAVTAAAAAPSVARSSAPSPAVTAAATSTAAAISTRAPTPSPAGRAPAADPRRAGAPALAGAARAEVGRNGNPGRERRPASAMARGDLDPGPESSVAAWVRESLLGTPRRSSAALAPQPGGRQGPSLAGLLGRCSGGSAWRQ [Repeated 1 time(s)]Running AlphaFold prediction [Repeated 1 time(s)] Chain information for best_model.pdb #2 --- Chain | Description A | No description available AlphaFold prediction finished Results in C:\Users\there/Downloads\ChimeraX\AlphaFold\prediction_7 Traceback (most recent call last): File "C:\Program Files\ChimeraX 1.3.dev202109170828\bin\lib\site- packages\chimerax\alphafold\predict.py", line 159, in _unzip_results path = join(self._download_directory, 'results.zip') File "C:\Program Files\ChimeraX 1.3.dev202109170828\bin\lib\ntpath.py", line 78, in join path = os.fspath(path) TypeError: expected str, bytes or os.PathLike object, not NoneType TypeError: expected str, bytes or os.PathLike object, not NoneType File "C:\Program Files\ChimeraX 1.3.dev202109170828\bin\lib\ntpath.py", line 78, in join path = os.fspath(path) See log for complete Python traceback. OpenGL version: 3.3.0 - Build 26.20.100.7639 OpenGL renderer: Intel(R) Iris(R) Plus Graphics 640 OpenGL vendor: Intel Manufacturer: Microsoft Corporation Model: Surface Laptop OS: Microsoft Windows 10 Pro (Build 19043) Memory: 8,503,017,472 MaxProcessMemory: 137,438,953,344 CPU: 4 Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz OSLanguage: en-US Locale: ('en_US', 'cp1252') PyQt5 5.15.2, Qt 5.15.2 Installed Packages: alabaster: 0.7.12 appdirs: 1.4.4 Babel: 2.9.1 backcall: 0.2.0 blockdiag: 2.0.1 certifi: 2021.5.30 cftime: 1.5.0 chardet: 4.0.0 ChimeraX-AddCharge: 1.1.4 ChimeraX-AddH: 2.1.10 ChimeraX-AlignmentAlgorithms: 2.0 ChimeraX-AlignmentHdrs: 3.2 ChimeraX-AlignmentMatrices: 2.0 ChimeraX-Alignments: 2.2.2 ChimeraX-AlphaFold: 1.0 ChimeraX-AltlocExplorer: 1.0.1 ChimeraX-AmberInfo: 1.0 ChimeraX-Arrays: 1.0 ChimeraX-Atomic: 1.29.1 ChimeraX-AtomicLibrary: 4.1.4 ChimeraX-AtomSearch: 2.0 ChimeraX-AtomSearchLibrary: 1.0 ChimeraX-AxesPlanes: 2.0 ChimeraX-BasicActions: 1.1 ChimeraX-BILD: 1.0 ChimeraX-BlastProtein: 2.0 ChimeraX-BondRot: 2.0 ChimeraX-BugReporter: 1.0 ChimeraX-BuildStructure: 2.6 ChimeraX-Bumps: 1.0 ChimeraX-BundleBuilder: 1.1 ChimeraX-ButtonPanel: 1.0 ChimeraX-CageBuilder: 1.0 ChimeraX-CellPack: 1.0 ChimeraX-Centroids: 1.2 ChimeraX-ChemGroup: 2.0 ChimeraX-Clashes: 2.1 ChimeraX-ColorActions: 1.0 ChimeraX-ColorGlobe: 1.0 ChimeraX-ColorKey: 1.5 ChimeraX-CommandLine: 1.1.5 ChimeraX-ConnectStructure: 2.0 ChimeraX-Contacts: 1.0 ChimeraX-Core: 1.3.dev202109170828 ChimeraX-CoreFormats: 1.1 ChimeraX-coulombic: 1.3.1 ChimeraX-Crosslinks: 1.0 ChimeraX-Crystal: 1.0 ChimeraX-CrystalContacts: 1.0 ChimeraX-DataFormats: 1.2.1 ChimeraX-Dicom: 1.0 ChimeraX-DistMonitor: 1.1.5 ChimeraX-DistUI: 1.0 ChimeraX-Dssp: 2.0 ChimeraX-EMDB-SFF: 1.0 ChimeraX-ExperimentalCommands: 1.0 ChimeraX-FileHistory: 1.0 ChimeraX-FunctionKey: 1.0 ChimeraX-Geometry: 1.1 ChimeraX-gltf: 1.0 ChimeraX-Graphics: 1.1 ChimeraX-Hbonds: 2.1.1 ChimeraX-Help: 1.2 ChimeraX-HKCage: 1.3 ChimeraX-IHM: 1.1 ChimeraX-ImageFormats: 1.2 ChimeraX-IMOD: 1.0 ChimeraX-IO: 1.0.1 ChimeraX-ItemsInspection: 1.0 ChimeraX-Label: 1.1 ChimeraX-ListInfo: 1.1.1 ChimeraX-Log: 1.1.4 ChimeraX-LookingGlass: 1.1 ChimeraX-Maestro: 1.8.1 ChimeraX-Map: 1.1 ChimeraX-MapData: 2.0 ChimeraX-MapEraser: 1.0 ChimeraX-MapFilter: 2.0 ChimeraX-MapFit: 2.0 ChimeraX-MapSeries: 2.1 ChimeraX-Markers: 1.0 ChimeraX-Mask: 1.0 ChimeraX-MatchMaker: 2.0.1 ChimeraX-MDcrds: 2.6 ChimeraX-MedicalToolbar: 1.0.1 ChimeraX-Meeting: 1.0 ChimeraX-MLP: 1.1 ChimeraX-mmCIF: 2.4 ChimeraX-MMTF: 2.1 ChimeraX-Modeller: 1.2 ChimeraX-ModelPanel: 1.2 ChimeraX-ModelSeries: 1.0 ChimeraX-Mol2: 2.0 ChimeraX-Morph: 1.0 ChimeraX-MouseModes: 1.1 ChimeraX-Movie: 1.0 ChimeraX-Neuron: 1.0 ChimeraX-Nucleotides: 2.0.2 ChimeraX-OpenCommand: 1.7 ChimeraX-PDB: 2.6.2 ChimeraX-PDBBio: 1.0 ChimeraX-PDBLibrary: 1.0.1 ChimeraX-PDBMatrices: 1.0 ChimeraX-PickBlobs: 1.0 ChimeraX-Positions: 1.0 ChimeraX-PresetMgr: 1.0.1 ChimeraX-PubChem: 2.1 ChimeraX-ReadPbonds: 1.0 ChimeraX-Registration: 1.1 ChimeraX-RemoteControl: 1.0 ChimeraX-ResidueFit: 1.0 ChimeraX-RestServer: 1.1 ChimeraX-RNALayout: 1.0 ChimeraX-RotamerLibMgr: 2.0 ChimeraX-RotamerLibsDunbrack: 2.0 ChimeraX-RotamerLibsDynameomics: 2.0 ChimeraX-RotamerLibsRichardson: 2.0 ChimeraX-SaveCommand: 1.5 ChimeraX-SchemeMgr: 1.0 ChimeraX-SDF: 2.0 ChimeraX-Segger: 1.0 ChimeraX-Segment: 1.0 ChimeraX-SelInspector: 1.0 ChimeraX-SeqView: 2.4.3 ChimeraX-Shape: 1.0.1 ChimeraX-Shell: 1.0 ChimeraX-Shortcuts: 1.1 ChimeraX-ShowAttr: 1.0 ChimeraX-ShowSequences: 1.0 ChimeraX-SideView: 1.0 ChimeraX-Smiles: 2.1 ChimeraX-SmoothLines: 1.0 ChimeraX-SpaceNavigator: 1.0 ChimeraX-StdCommands: 1.6 ChimeraX-STL: 1.0 ChimeraX-Storm: 1.0 ChimeraX-Struts: 1.0 ChimeraX-Surface: 1.0 ChimeraX-SwapAA: 2.0 ChimeraX-SwapRes: 2.1 ChimeraX-TapeMeasure: 1.0 ChimeraX-Test: 1.0 ChimeraX-Toolbar: 1.1 ChimeraX-ToolshedUtils: 1.2 ChimeraX-Tug: 1.0 ChimeraX-UI: 1.13 ChimeraX-uniprot: 2.2 ChimeraX-UnitCell: 1.0 ChimeraX-ViewDockX: 1.0.1 ChimeraX-VIPERdb: 1.0 ChimeraX-Vive: 1.1 ChimeraX-VolumeMenu: 1.0 ChimeraX-VTK: 1.0 ChimeraX-WavefrontOBJ: 1.0 ChimeraX-WebCam: 1.0 ChimeraX-WebServices: 1.0 ChimeraX-Zone: 1.0 colorama: 0.4.4 comtypes: 1.1.10 cxservices: 1.1 cycler: 0.10.0 Cython: 0.29.24 decorator: 5.1.0 distlib: 0.3.2 docutils: 0.17.1 filelock: 3.0.12 funcparserlib: 0.3.6 grako: 3.16.5 h5py: 3.4.0 html2text: 2020.1.16 idna: 2.10 ihm: 0.20 imagecodecs: 2021.4.28 imagesize: 1.2.0 ipykernel: 5.5.5 ipython: 7.23.1 ipython-genutils: 0.2.0 jedi: 0.18.0 Jinja2: 3.0.1 jupyter-client: 6.1.12 jupyter-core: 4.8.1 kiwisolver: 1.3.2 lxml: 4.6.3 lz4: 3.1.3 MarkupSafe: 2.0.1 matplotlib: 3.4.3 matplotlib-inline: 0.1.3 msgpack: 1.0.2 netCDF4: 1.5.7 networkx: 2.6.3 numexpr: 2.7.3 numpy: 1.21.2 openvr: 1.16.801 packaging: 21.0 ParmEd: 3.2.0 parso: 0.8.2 pickleshare: 0.7.5 Pillow: 8.3.2 pip: 21.2.4 pkginfo: 1.7.1 prompt-toolkit: 3.0.20 psutil: 5.8.0 pycollada: 0.7.1 pydicom: 2.1.2 Pygments: 2.10.0 PyOpenGL: 3.1.5 PyOpenGL-accelerate: 3.1.5 pyparsing: 2.4.7 PyQt5-commercial: 5.15.2 PyQt5-sip: 12.8.1 PyQtWebEngine-commercial: 5.15.2 python-dateutil: 2.8.1 pytz: 2021.1 pywin32: 228 pyzmq: 22.3.0 qtconsole: 5.1.1 QtPy: 1.11.1 RandomWords: 0.3.0 requests: 2.25.1 scipy: 1.7.1 setuptools: 57.5.0 sfftk-rw: 0.7.1 six: 1.16.0 snowballstemmer: 2.1.0 sortedcontainers: 2.4.0 Sphinx: 4.2.0 sphinx-autodoc-typehints: 1.12.0 sphinxcontrib-applehelp: 1.0.2 sphinxcontrib-blockdiag: 2.0.0 sphinxcontrib-devhelp: 1.0.2 sphinxcontrib-htmlhelp: 2.0.0 sphinxcontrib-jsmath: 1.0.1 sphinxcontrib-qthelp: 1.0.3 sphinxcontrib-serializinghtml: 1.1.5 suds-jurko: 0.6 tables: 3.6.1 tifffile: 2021.4.8 tinyarray: 1.2.3 tornado: 6.1 traitlets: 5.1.0 urllib3: 1.26.6 wcwidth: 0.2.5 webcolors: 1.11.1 wheel: 0.37.0 wheel-filename: 1.3.0 WMI: 1.5.1
Change History (9)
comment:1 by , 4 years ago
Component: | Unassigned → Structure Prediction |
---|---|
Owner: | set to |
Platform: | → all |
Project: | → ChimeraX |
Status: | new → assigned |
Summary: | ChimeraX bug report submission → AlphaFold unzipping of results: expected str, bytes or os.PathLike object, not NoneType |
comment:2 by , 4 years ago
comment:3 by , 4 years ago
Maybe a double-click on the AlphaFold tool button does queue up two runs and the second is very quick since all the files are already cached and so two results.zip downloads happen before either completes. I am testing this now.
comment:4 by , 4 years ago
Looks like I really should have a way to quit the current prediction and start a new one. Currently even if it does start the second job, I think it will use the cached files from the first job which is for a different sequence!
comment:5 by , 4 years ago
Current colab script checks if sequence has changed and moves the results directory and starts over. So running a second prediction should correctly recompute with the new sequence.
comment:6 by , 4 years ago
The log shows "Results in C:\Users\there/Downloads\ChimeraX\AlphaFold\prediction_7" so the results were downloaded once and download directory set to None and then the second results.zip download happened giving the error.
comment:7 by , 4 years ago
Double clicking the predict button did not cause an error when results were downloaded. Pressing the predict button again after completed also did not cause any error. So it seems it required precise timing to get two results.zip downloads going at once. I can simply not unzip the results if the download directory is not set, suppressing this error. Or I can leave it as is -- I don't think it is likely to be seen again. Suppressing will also not show the best fit for that second try. I think it is better leave the error.
Maybe the download directory should not be cleared until a new run is started. Seems not great since the user can press the colab play button and cause a second results download which will then go to the same directory and get a different file suffix.
Another approach is to pass the downloads directory into the unzip routine instead of using an instance attribute. I didn't do this before because multiple downloads go to the directory, the best model pdb and results.zip, but I since eliminated the pdb since it is in results.zip. But in the future we may also want multiple downloads.
comment:8 by , 4 years ago
If you manage to get two downloads of results.zip the second will have an altered file name. So I think it is probably reasonable to not try to unzip it, the first copy was already unzipped. So I guess it is ok to put in the check for download directory = None and ignore that zip file.
comment:9 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed.
In case user manages to start two results.zip downloads before one completes I put in code to only unzip the first and avoid the reported error.
Appears the user clicked the AlphaFold tool predict button twice for model #1 and twice for a specified sequence.
The AlphaFold tool has a "running" flag it checks and is supposed to give an error starting a second run when one is already running. But the code never sets running = True, so it simply tries to run the next job. Not clear what that does, but it looks like it would simply replace the current run since we use just one Colab browser instance. This behavior might be better than if the running flag worked, because the running flag would prevent canceling the current job and replacing it.
If only the most recent run proceeds then I don't see how the reported error happened. The reported error is because the download directory where results.zip was downloaded was not not set. The only way the unzip routine can be called is if the download directory is set. So it was set. But after an unzip the download directory is set to None so the next run uses a new directory. So it looks like two unzip calls were made with the first setting download directory to None and the second then giving this error.
To get the unzip method called twice there need to be two download requests of results.zip both made before either download finishes. Maybe the run completed and the download request was made and the user then clicked the play button on the Colab window which quickly made another download request before the first one was complete. I think that would generate this error, but the timing would be hard to achieve since the results.zip download should be pretty fast.