Opened 6 years ago

Closed 5 years ago

#2700 closed defect (fixed)

Can't open .pyc file

Reported by: chimerax-bug-report@… Owned by: Greg Couch
Priority: normal Milestone:
Component: Input/Output Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Linux-3.10.0-514.21.1.el7.x86_64-x86_64-with-centos-7.3.1611-Core
ChimeraX Version: 0.9 (2019-06-06)
Description
(Describe the actions that caused this problem to occur here)

Log:
Startup Messages  
---  
note | available bundle cache has not been initialized yet  
  
UCSF ChimeraX version: 0.9 (2019-06-06)  
© 2016-2019 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open
/data/wangchy/linux/Desktop/MICUs_Paper/Model_in_maps_ver2/post459_first_6_frames.mrc

Opened post459_first_6_frames.mrc, grid size 300,300,300, pixel 1.06, shown at
level -2.36e-06, step 2, values float32  

> volume #1 orthoplanes xyz positionPlanes 149,149,149

> volume #1 orthoplanes xyz positionPlanes 149,149,149

> volume #1 region 126,0,0,126,299,299

> volume #1 region 144,0,0,144,299,299

> show #!1.1 models

> hide #!1.2 models

> volume #1 region 157,0,0,157,299,299

> select #1.1

2 models selected  

> hide #!1.1 models

> show #!1.1 models

> close #1

> open
/data/wangchy/linux/Desktop/MICUs_Paper/Model_in_maps_ver2/post459_first_6_frames.mrc

Opened post459_first_6_frames.mrc, grid size 300,300,300, pixel 1.06, shown at
level -2.36e-06, step 2, values float32  

> volume #1 region 0,0,209,299,299,209

> volume #1 region 0,0,208,299,299,208

> show #!1.1 models

> hide #!1.2 models

> show #!1.2 models

> select #1

3 models selected  

> select #1

3 models selected  

> volume #1 region 0,0,22,299,299,22

> lighting simple

> close #1

> open
/data/wangchy/linux/Desktop/MICUs_Paper/Model_in_maps/maps/WCY95B_relion_job037_postprocess76_B50_aligned.mrc

Opened WCY95B_relion_job037_postprocess76_B50_aligned.mrc, grid size
304,304,304, pixel 1.09, shown at level 0.00549, step 2, values float32  

> volume #1 region 174,0,0,174,303,303

> volume #1 region 215,0,0,215,303,303

> volume #1 region 148,0,0,148,303,303

> volume #1 region 152,0,0,152,303,303

> volume #1 region 160,0,0,160,303,303

> help help:user

> volume #1 region 151,0,0,151,303,303

> show #!1.1 models

> hide #!1.2 models

> show #!1.2 models

> hide #!1.1 models

> show #!1.1 models

> close #1.2

> hide #!1 models

> show #!1 models

> hide #!1 models

> hide #!1.1 models

> show #!1.1 models

> volume #1 region 145,0,0,145,303,303

> volume #1 region 126,0,0,126,303,303

> select #1

2 models selected  

> ~select #1.1

1 model selected  

> save /data/wangchy/linux/Desktop/image1.png supersample 3

> close #1

> set bgColor #ffffff

> open /ssd_polar/wangchy/WCY95B/Figures/Figure1/color2_ver6.py

ChimeraX cannot open a regular Chimera session.  
An exporter from Chimera to ChimeraX is being worked on but is not ready at
this time.  

> open /ssd_polar/wangchy/WCY95B/Figures/Figure1/color2_ver6.pyc

Traceback (most recent call last):  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/toolbar/tool.py", line 141, in <lambda>  
lambda e, what=what, self=self: self.handle_scheme(what),  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/toolbar/tool.py", line 96, in handle_scheme  
run(self.session, f'{value}')  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/core/commands/run.py", line 31, in run  
results = command.run(text, log=log)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/core/commands/cli.py", line 2632, in run  
result = ci.function(session, **kw_args)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/core/commands/open.py", line 64, in open  
path_models = session.models.open(paths, format=format, name=name, **kw)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/core/models.py", line 604, in open  
session, filenames, format=format, name=name, **kw)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/core/io.py", line 477, in open_multiple_data  
models, status = open_data(session, fspec, format=format, name=name, **kw)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/site-
packages/chimerax/core/io.py", line 431, in open_data  
models, status = open_func(*args, **kw)  
File "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/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 "/programs/x86_64-linux/chimerax/0.9/lib/python3.7/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: 3.3.0 NVIDIA 375.66
OpenGL renderer: Quadro M2000/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation

Change History (2)

comment:1 by pett, 6 years ago

Component: UnassignedInput/Output
Owner: set to Greg Couch
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionCan't open .pyc file

After failing to open a Chimera1 .py file, this user tried to open the corresponding .pyc. ChimeraX should either disallow opening .pyc files, or process them correctly, not throw the error shown.

comment:2 by Greg Couch, 5 years ago

Resolution: fixed
Status: assignedclosed

pyc files from different versions of Python are rejected with a "Python code was compiled for a different version of Python" user error. pyc files from the same version of Python execute normally.

Note: See TracTickets for help on using tickets.