Opened 7 years ago
Closed 6 years ago
#1723 closed defect (fixed)
Drop of .pyc file → source code string cannot contain null bytes
| Reported by: | Owned by: | Greg Couch | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Input/Output | Version: | |
| Keywords: | Cc: | Tom Goddard | |
| Blocked By: | Blocking: | ||
| Notify when closed: | Platform: | all | |
| Project: | ChimeraX |
Description
The following bug report has been submitted: Platform: Darwin-18.2.0-x86_64-i386-64bit ChimeraX Version: 0.8 (2018-12-17) Description (Describe the actions that caused this problem to occur here) Log: Startup Messages --- note | available bundle cache has not been initialized yet Updating list of available bundles failed: 'list' object has no attribute 'split' UCSF ChimeraX version: 0.8 (2018-12-17) How to cite UCSF ChimeraX > open "/Users/katherineberman/Dropbox (LucksLab)/LucksLab/Group_Resources/Grant_Proposals/Writing/NIH-R01-Riboswitches/Elements/05-Research_Strategy/Figures/Figure_5/Resources/4fe5_xpt_pbuX.pyc" Traceback (most recent call last): File "/private/var/folders/0h/013r8l7s2sx5gbmg7gg00kx40000gn/T/AppTranslocation/865BD88C-1337-40EB-B3D1-306420E9D9F9/d/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/ui/gui.py", line 458, in dropEvent _open_dropped_file(self.session, p) File "/private/var/folders/0h/013r8l7s2sx5gbmg7gg00kx40000gn/T/AppTranslocation/865BD88C-1337-40EB-B3D1-306420E9D9F9/d/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/ui/gui.py", line 1136, in _open_dropped_file run(session, 'open %s' % quote_if_necessary(path)) File "/private/var/folders/0h/013r8l7s2sx5gbmg7gg00kx40000gn/T/AppTranslocation/865BD88C-1337-40EB-B3D1-306420E9D9F9/d/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/commands/run.py", line 31, in run results = command.run(text, log=log) File "/private/var/folders/0h/013r8l7s2sx5gbmg7gg00kx40000gn/T/AppTranslocation/865BD88C-1337-40EB-B3D1-306420E9D9F9/d/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/commands/cli.py", line 2587, in run result = ci.function(session, **kw_args) File "/private/var/folders/0h/013r8l7s2sx5gbmg7gg00kx40000gn/T/AppTranslocation/865BD88C-1337-40EB-B3D1-306420E9D9F9/d/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/commands/open.py", line 41, in open from_database=from_database, ignore_cache=ignore_cache, **kw)) File "/private/var/folders/0h/013r8l7s2sx5gbmg7gg00kx40000gn/T/AppTranslocation/865BD88C-1337-40EB-B3D1-306420E9D9F9/d/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/commands/open.py", line 117, in open models = handle_unknown_kw(session.models.open, paths, format=format, name=name, **kw) File "/private/var/folders/0h/013r8l7s2sx5gbmg7gg00kx40000gn/T/AppTranslocation/865BD88C-1337-40EB-B3D1-306420E9D9F9/d/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/commands/open.py", line 62, in handle_unknown_kw return f(*args, **kw) File "/private/var/folders/0h/013r8l7s2sx5gbmg7gg00kx40000gn/T/AppTranslocation/865BD88C-1337-40EB-B3D1-306420E9D9F9/d/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/models.py", line 590, in open session, filenames, format=format, name=name, **kw) File "/private/var/folders/0h/013r8l7s2sx5gbmg7gg00kx40000gn/T/AppTranslocation/865BD88C-1337-40EB-B3D1-306420E9D9F9/d/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/io.py", line 461, in open_multiple_data models, status = open_data(session, fspec, format=format, name=name, **kw) File "/private/var/folders/0h/013r8l7s2sx5gbmg7gg00kx40000gn/T/AppTranslocation/865BD88C-1337-40EB-B3D1-306420E9D9F9/d/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/io.py", line 414, in open_data models, status = open_func(*args, **kw) File "/private/var/folders/0h/013r8l7s2sx5gbmg7gg00kx40000gn/T/AppTranslocation/865BD88C-1337-40EB-B3D1-306420E9D9F9/d/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/scripting.py", line 57, in open_python_script code = compile(data, file_name, 'exec') ValueError: source code string cannot contain null bytes ValueError: source code string cannot contain null bytes File "/private/var/folders/0h/013r8l7s2sx5gbmg7gg00kx40000gn/T/AppTranslocation/865BD88C-1337-40EB-B3D1-306420E9D9F9/d/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site- packages/chimerax/core/scripting.py", line 57, in open_python_script code = compile(data, file_name, 'exec') See log for complete Python traceback. OpenGL version: 4.1 INTEL-12.4.7 OpenGL renderer: Intel(R) Iris(TM) Plus Graphics 640 OpenGL vendor: Intel Inc.
Change History (3)
comment:1 by , 7 years ago
| Cc: | added |
|---|---|
| Component: | Unassigned → Input/Output |
| Owner: | set to |
| Platform: | → all |
| Project: | → ChimeraX |
| Status: | new → assigned |
| Summary: | ChimeraX bug report submission → Drop of .pyc file → source code string cannot contain null bytes |
comment:2 by , 7 years ago
comment:3 by , 6 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Can properly open .pyc files now.
Note:
See TracTickets
for help on using tickets.
Saw this once before (probably there is a ticket) where I believe the user dropped a Chimera 1 session file the byte code compiled version *.pyc onto ChimeraX. I think I concluded Python3 gives this error if you hand it a Python2 *.pyc.
Possibly we should detect this, and maybe detect attempts to open Chimera 1 session .py files too based on the resulting error and give a more friendly error message that ChimeraX cannot read Chimera 1 session files.